Page 1 of 1

javascript in FireFox in MAC

Posted: Fri Jul 06, 2007 12:07 am
by LuzzyRaabu
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


[syntax="javascript"]function fetchQuery(userid)
{
if (navigator.appVersion.indexOf('Macintosh') > -1)
		{
		alert('within mac');
		var searchString = document.getElementById('searchContent').value;
		document.getElementById('userid').value = userid;
		document.getElementById('Test').value=searchString;
		alert(searchString);
		alert(userid);
		//   alert(document.getElementsByTagName('td'));
		//var allTDs = document.getElementsByTagName("button");
		//alert("# of table cells: " + allTDs.length);
		alert(document.getElementById('Test').value);
		}


else(navigator.appVersion.indexOf(MSIE) > -1)
		{
		alert('Within Windows IE');
		var searchString = document.getElementById('searchContent').value;
		document.getElementById('userid').value = userid;
		document.getElementById('Test').value=searchString;
		alert(searchString);
		alert(userid);
		//   alert(document.getElementsByTagName('td'));
		//var allTDs = document.getElementsByTagName("button");
		//alert("# of table cells: " + allTDs.length);
		alert(document.getElementById('Test').value);
		}
}
[/syntax]

Code: Select all

<?php

  print "<input type=hidden name=Test ID=Test value=$Test>"; 
  print "<input type=hidden name=userid ID=Test value=$userid>";
print"<input style='position:relative;' type=button value=' Go '  onclick='fetchQuery(userid)";
print "<input style='position:relative;' type=textbox name='searchContent' id='searchContent' >";
?>
In FireFox in MAC, the 'Test' value is not accepting any value. if i alert the 'searchString', i am having value.But in 'Test', there is no value.
what to do? but in Windows IE, i can retrieve value for 'Test' .
What changes i have to do for MAC?


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Fri Jul 06, 2007 1:29 am
by feyd
Which "test" value isn't working, specifically?

Posted: Fri Jul 06, 2007 3:18 am
by Chris Corbyn
You've forgotten some quotes in there by the way:

Code: Select all

else(navigator.appVersion.indexOf(MSIE) > -1) 
Missing quotes on 'MSIE'