474,044 Members | 3,015 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 3684


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
32167
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
4265
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
3642
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
11740
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
7473
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
1989
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
2407
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
1838
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
10546
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10337
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
11602
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...
1
12022
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
11141
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...
0
10309
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8698
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
6836
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4944
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.