javascript in FireFox in MAC

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
LuzzyRaabu
Forum Newbie
Posts: 6
Joined: Wed Jun 27, 2007 2:49 am

javascript in FireFox in MAC

Post 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]
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Which "test" value isn't working, specifically?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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'
Post Reply