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

Discussion in 'Javascript' started by aquimr@gmail.com, Sep 7, 2005.

  1. Guest

    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
    , Sep 7, 2005
    #1
    1. Advertising

  2. 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.value

    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/
    Martin Honnen, Sep 7, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rick
    Replies:
    3
    Views:
    8,089
    Alexey Smirnov
    Apr 13, 2010
  2. Microsoft Centre Of Excellence

    List Box Control on Safari browser on Mac

    Microsoft Centre Of Excellence, Nov 16, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    232
    Microsoft Centre Of Excellence
    Nov 16, 2004
  3. Marcel
    Replies:
    1
    Views:
    405
    Thomas 'PointedEars' Lahn
    Nov 6, 2003
  4. JB
    Replies:
    3
    Views:
    125
    Fred Oz
    Nov 7, 2004
  5. Giuseppe Chielli

    Window size via Javascript for Safari (Mac)

    Giuseppe Chielli, Apr 11, 2005, in forum: Javascript
    Replies:
    4
    Views:
    92
    Giuseppe Chielli
    Apr 12, 2005
Loading...

Share This Page