Hi,
I need to pass a value from a hidden input:
<input id="hiddentxtWi dth" type="hidden" value="1065" />
to a JavaScript function.
I've tried the following:
<script type="text/javascript" >
window.resizeTo (<%= hiddentxtWidth. value %>, <%=
hiddentxtHeight .value %>);
</script>
But I get a "The name 'hiddertxtWidth ' does not exist in the current
context" error.
I would very much like to store the page width and height in the
Web.Config file and pass it to the JavaScript function but I don't
know how to do that.
Any suggestions? 3 3394
If you're doing this all clientside, then you're looking for http://msdn2.microsoft.com/en-us/library/ms536437.aspx
function TestMe
{
var v=document.getE lementById("hid dentxtWidth");
if (null!=v)
{
alert(v.value);
}
}
something like that. give it a try.
Use null checks to avoid a bunch of javascript errors.
"Steve Kershaw" <st***********@ yahoo.comwrote in message
news:11******** **************@ u30g2000hsc.goo glegroups.com.. .
Hi,
I need to pass a value from a hidden input:
<input id="hiddentxtWi dth" type="hidden" value="1065" />
to a JavaScript function.
I've tried the following:
<script type="text/javascript" >
window.resizeTo (<%= hiddentxtWidth. value %>, <%=
hiddentxtHeight .value %>);
</script>
But I get a "The name 'hiddertxtWidth ' does not exist in the current
context" error.
I would very much like to store the page width and height in the
Web.Config file and pass it to the JavaScript function but I don't
know how to do that.
Any suggestions?
Just type getElementById in google search and you'll see a bunch of
javascript links.
I don't know about using the web.config for holding window size information
but you can set session variables in the global.asax.
Then just grab session("elemW" ) if that's what you called it.
The syntax might not be exactly correct for grabbing the session variable,
but the concept is right.
"Steve Kershaw" <st***********@ yahoo.comwrote in message
news:11******** **************@ u30g2000hsc.goo glegroups.com.. .
Hi,
I need to pass a value from a hidden input:
<input id="hiddentxtWi dth" type="hidden" value="1065" />
to a JavaScript function.
I've tried the following:
<script type="text/javascript" >
window.resizeTo (<%= hiddentxtWidth. value %>, <%=
hiddentxtHeight .value %>);
</script>
But I get a "The name 'hiddertxtWidth ' does not exist in the current
context" error.
I would very much like to store the page width and height in the
Web.Config file and pass it to the JavaScript function but I don't
know how to do that.
Any suggestions?
How to Pass Messages and Actions between Server and Client http://usableasp.net/DeveloperPage.a...rAndClient.htm
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET] http://msmvps.com/blogs/egoldin http://usableasp.net
"Steve Kershaw" <st***********@ yahoo.comwrote in message
news:11******** **************@ u30g2000hsc.goo glegroups.com.. .
Hi,
I need to pass a value from a hidden input:
<input id="hiddentxtWi dth" type="hidden" value="1065" />
to a JavaScript function.
I've tried the following:
<script type="text/javascript" >
window.resizeTo (<%= hiddentxtWidth. value %>, <%=
hiddentxtHeight .value %>);
</script>
But I get a "The name 'hiddertxtWidth ' does not exist in the current
context" error.
I would very much like to store the page width and height in the
Web.Config file and pass it to the JavaScript function but I don't
know how to do that.
Any suggestions? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: NewbieJon |
last post by:
I am attempting to send the variable "sComputerName" from my ActiveX script to "GetInfo.asp" using javascript. (Having been advised this is the way to get my ActiveX variable into my ASP script)
My code is below. I am getting the following error "MyForm.oNetwork.Value is Null or is not an object". I'm struggling to diagnose what to do next. I'd very much appreciate some help
Many thanks
<HTML><BODY><FORM NAME="MyForm"...
|
by: Fred |
last post by:
Hi,
i know how to pass a value from Javascript to ASP with a hidden field into a
form and submitting it, or with cookies, but here i have to pass a lot of
data in an array.
There is a list of product the visitor can order by clicking one or more
checkboxes. I made a form containing input with type "checkbox" like:
<form>
<input type="checkbox" name=ck id=ck
|
by: Amir |
last post by:
Hi,
I'd like to know if it's possible to pass an image name (the IMG SRC
attribute) from HREF element to a function that is activated by onClick
event and creates a Web page.
I have this HREF element:
<A HREF onClick="showLargePicture()"><IMG HEIGHT=25 SRC="test01.jpg"></A>
|
by: platostoteles |
last post by:
Hallo NG,
I am new to JavaScript and would really appreciate any help to solve my
problem.
I am using the blow code in my form to validate form fields. What I
would like to accomplish is that if when the list/menu (attribute6)
value is "Ja" then to make the TextField Pas Nr (attribute4)
required. And if when the list/menu (attribute6) value is "Nee" to
make the TextField Pas Nr (attribute4) not required.
|
by: killafo |
last post by:
ok so i have a whole bunch of rows that i get from a ResultSet. When i click on a td in a row i want to pass the date value of that row to a function. in IE7 i can get away with saying....
<td .....onclick="javascript:getIt(this.value) id="..." name="...">
Is there something specific that Firefox is looking for, because it gives me "underfined" (using FireFox 2.0.0.3). i'll post the revelant code:
this is the TD i want to get the info...
| |
by: IRC |
last post by:
hey, i am pretty new on javascript as well as PHP,
Hey, anyone can you help me, how to pass the javascript array value to
php page.........
i want to retrieve the values which are arrayed on "selectedValues"
from next page for php variable
this is my javascript code saved on "sendValue.js" file,
<script>
function updateRecordEntry(requestValue){
|
by: JohnDriver |
last post by:
Hi,
I am having a form which has a text box and 3 radio buttons. I am using GET method in Ajax to pass the value. I can pass the value of the textbox fine but how to pass the value of radio button?
I searched a few things on Google but I find the javascript below most useful in my case but there is some problem that my code is not running:
var test = document.getElementsByName("meal");
for (i = 0; i < test.length; i++) {
|
by: zac540 |
last post by:
Hey everyone!
First of all I'd like to say that I did my best to look for any other relevant posts. The best I found was this interesting thread.. http://bytes.com/forum/thread594982.html
If it answered my question I am just to stupid to realize it I would like to apologize in advance. This is my very first attempt at using Javascript so any help at all is greatly appreciated. I read the W3Schools Tutorial on Javascript so that and some...
|
by: montybytes |
last post by:
Hi there,
Although, I have already placed this question in the HTML/CSS section, perhaps it might be worthwhile asking the question here as well.
I have a JavaScript function which retrieves the left-position of an Element. This JavaScript functions works in FF and IE7 but does not work in IE6, In IE6 it retrieves the wrong offsetLeft value. Having investigated the problem I noticed it had something to do with the margin-left and position...
|
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...
|
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,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |