473,700 Members | 2,459 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3664


aq****@gmail.co m 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="inputName 1">
and then with even old browsers you can access
document.forms. yourFormName.el ements.inputNam e1.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/
Sep 7 '05 #2

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

Similar topics

1
32149
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 = document.createElement("input"); currentElement.setAttribute("type", "hidden"); currentElement.setAttribute("name", "hiddenName"); currentElement.setAttribute("id", "hiddenName");
4
665
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 side the value is empty. Any idea on the best way to set a hidden field on the client side and read its value on the server side? Thanks. Mike
2
4244
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" runat="server" value='<%# DataBinder.Eval(Container, "DataItem.item_id").ToString() %>'> I can get around that using an asp.net textbox control, but it doesn't
4
3626
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 at the network from their computer using control File1. 2. The user clickes the button Commit picture (with id CliBtn) a. The script is running at the client to get the sharename of the file
4
11713
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 /><br /> <asp:Button ID="BtnSubmit" runat="server" OnClick="BtnSubmit_Click" Text="Submit" ValidationGroup="submitStates" /> <asp:RequiredFieldValidator ID="RequiredFieldValidator1"
11
7414
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 is not reset to '0' when i push the reset button. If I simply change the node from "<input type="hidden" id='IsChanged' value='0'>" to "<input type="text" id='IsChanged' value='0'>" Everything is working as expected (the value is reset to '0'...
1
1976
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 the form, it hits the this javascript procedure: function LoadHidden() { document.getElementById('MainFormTx').value=htmlEncode(document.getElementById('mainDiv').innerHTML); } ***plesae excuse the hack-ish nature of this...
5
2394
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 user logs into application automatically a pop up window should come, means i don't want for every time that should open, For specific condition only pop up window will open. Let me explain that condition i have table called interview and field...
2
1826
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 the code in the Page Init to without any results. Could someone please assist? Code Snippet: <input id="hdnTextBoxData" name = "hdnTextBoxData" type="hidden"
0
8645
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9075
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8925
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6561
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5903
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4657
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3089
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2392
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2028
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.