Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Hidden Control's value is not showing in javascript on MAC Safari

Reply
Thread Tools

Hidden Control's value is not showing in javascript on MAC Safari

 
 
aquimr@gmail.com
Guest
Posts: n/a
 
      09-07-2005
Hi,

I'm using input hidden control's value in the javascript function.

same code is working fine on all other browser except a specific
version of safari(i.e.: MAC OS 10.3.7 and Safari 1.2.4).

problem:
control's value is not getting displaying at the first time
when the page gets load, although the same piece of code would work if
I just refresh the page, strage.

declaration of hidden control:
<INPUT id="hSliders" type="hidden" runat="server">

javascript code which is calling the value of hSliders:

alert(document.Form1.hSliders.value)

this alert is showing nothing although it should display string.

i check the view source also control's value is getting populated.

Any help would greatly appriciated.

Thanks,
Aquim

 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      09-07-2005


http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> declaration of hidden control:
> <INPUT id="hSliders" type="hidden" runat="server">


That seems to be ASP.NET stuff and not HTML but with HTML an <input>
element should have a name attribute e.g.
<input type="hidden" name="inputName1">
and then with even old browsers you can access
document.forms.yourFormName.elements.inputName1.va lue

Other than that I don't know what could be wrong but it does not help
much here if you show server-side code, in particular for an environment
like ASP.NET which might generate different markup for different browsers.
If you still have problems then post the HTML Safari gets, show us the
HTML markup of the relevant HTML <form> and the relevant <input>.

Of course if your claim that it does not work with "MAC OS 10.3.7 and
Safari 1.2.4" means you have tested with other Safari versions and there
it works then it could also be a bug in Safari. But using a name
attribute could help work around that.


--

Martin Honnen
http://JavaScript.FAQTs.com/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate Hidden field on post back and retrieve value from Hidden Field Rick ASP .Net 3 04-13-2010 05:38 PM
Safari, hidden iframe, submit form target = iframe chris.alex.thomas@gmail.com Javascript 0 02-21-2006 01:48 AM
Window size via Javascript for Safari (Mac) Giuseppe Chielli Javascript 4 04-12-2005 04:27 PM
Javascript not working with Safari/Firefox (Mac) JB Javascript 3 11-07-2004 11:17 AM
Javascript error on Mac with Safari browser Marcel Javascript 1 11-06-2003 03:28 PM



Advertisments