473,387 Members | 1,575 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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 '05 #1
1 3631


aq****@gmail.com 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/
Sep 7 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Raghuram Banda | last post by:
Hi All, Can any one help me how to create a HIDDEN element using JavaScript (DOM) dynamically The following codes works fine with IE but not in Netscape currentElement =...
4
by: Mike | last post by:
Hi, I need to read an hidden field on the server side (code behind). I can modify the value in Javascript (client side), then call "form.submit();" on the client side. However, on the server...
2
by: Rodusa | last post by:
I have a hidden field inside one datagrid which I can't get to make it keep its state after a postback event. Look field: <input type="hidden" id="TxtHiddenItem_id" name="TxtHiddenItem_id"...
4
by: Magnus Blomberg | last post by:
Hello! I have a problem when using a hidden field to send a value to the server. Below you can see my code in simplyfied versions. What I'm trying to do is: 1. The user browses for a picture...
4
by: WB | last post by:
Hi, I need to validate a hidden input in my webform to ensure that it's got value. The controls look something like this: <input id="HidSelectedStates" type="hidden" runat="server" /><br...
11
by: newbie | last post by:
i have a form in which a hidden field (initial value as '0', and my javascript set it to '1' when an event is trigged). In the same form, i have a reset field. But I realized that the hidden field...
1
by: jamestpaul | last post by:
I'm having some difficulty with Safari users and hidden fields in my .NET 2 asp application. There is a hidden field that gets loaded with the contents of a div in my form. When the user submits...
5
by: sbettadpur | last post by:
Hello everybody I have some issues in my program. Let me explain my requirement briefly, i am using php, mysql, javascript and ajax for my application. when my application opens means if...
2
by: =?Utf-8?B?TWFubnk=?= | last post by:
Hello Folks, I am having an issue with retrieving value of hidden field in the codebehind. The value of the control is set using Javascript defined in the Page Load Event. I have tried putting...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.