Click here to Skip to main content
15,914,392 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: How can I craete a weblog site? Pin
Vasudevan Deepak Kumar16-Jul-07 2:01
Vasudevan Deepak Kumar16-Jul-07 2:01 
QuestionClick Event not firing Pin
Abbas8213-Jul-07 8:20
Abbas8213-Jul-07 8:20 
AnswerRe: Click Event not firing Pin
Kschuler13-Jul-07 9:05
Kschuler13-Jul-07 9:05 
GeneralRe: Click Event not firing Pin
Abbas8213-Jul-07 9:36
Abbas8213-Jul-07 9:36 
GeneralRe: Click Event not firing Pin
Kschuler13-Jul-07 9:45
Kschuler13-Jul-07 9:45 
QuestionClassic ASP website with MS SQL Express Database HELP!! Pin
Fayu13-Jul-07 6:10
Fayu13-Jul-07 6:10 
AnswerRe: Classic ASP website with MS SQL Express Database HELP!! Pin
Kschuler13-Jul-07 9:06
Kschuler13-Jul-07 9:06 
QuestionRetrieving Form Element Values (re-worded repost) Pin
#realJSOP13-Jul-07 4:21
professional#realJSOP13-Jul-07 4:21 
Using "classic" ASP

In this app, I've setup a javascript function (SetScreenWidth) that allows the programmer to specify a screen resolution so that the site's layout can be tested at various horizontal widths (1024, 1280, etc) without having to change the display properties on the desktop. If no value is passed to this function, the screenwidth will be set to whatever the user's desktop horizontal size is.

After calling this function, I set the value in a hidden form field to whatever screenwidth was determined by that function. The theory is that this should allow me to use that screenwidth elsewhere in the asp page via a (seemingly) simple retrieval of data from the hidden field.

I have verified that the hidden field is indeed being set to the expected value (I used the firebug DOM inspector for this), but when I try to use vbscript to retrieve the value from the hidden field, it fails with a "Object Required" error on the line indicated in red below.


<%@ LANGUAGE="VBSCRIPT" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>

<form id="spanForm" name="spanForm" action="#">
    <input id="screenSpanWidth" name="screenSpanWidth" type="hidden" />
</form>

<script language='JavaScript' type='text/javascript'>
    SetScreenWidth(1024);
    document.forms['spanForm'].screenSpanWidth.value = var_nScreenWidth.toString();
</script>

<%
Dim nUserScreenWidth
<code>nUserScreenWidth = Document.forms.namedItem("spanForm").screenSpanWidth.value</code>
%>

</body>
</html>


I'm desperate for help on this. Thanks in advance.




"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001


AnswerRe: Retrieving Form Element Values (re-worded repost) Pin
SHatchard13-Jul-07 5:51
SHatchard13-Jul-07 5:51 
AnswerRe: Retrieving Form Element Values (re-worded repost) Pin
Fred_Smith13-Jul-07 6:29
Fred_Smith13-Jul-07 6:29 
GeneralRe: Retrieving Form Element Values (re-worded repost) Pin
#realJSOP13-Jul-07 6:58
professional#realJSOP13-Jul-07 6:58 
GeneralRe: Retrieving Form Element Values (re-worded repost) Pin
#realJSOP13-Jul-07 7:50
professional#realJSOP13-Jul-07 7:50 
GeneralRe: Retrieving Form Element Values (re-worded repost) Pin
Fred_Smith13-Jul-07 8:17
Fred_Smith13-Jul-07 8:17 
GeneralRe: Retrieving Form Element Values (re-worded repost) Pin
JimmyRopes13-Jul-07 11:08
professionalJimmyRopes13-Jul-07 11:08 
GeneralRe: Retrieving Form Element Values (re-worded repost) Pin
#realJSOP14-Jul-07 1:49
professional#realJSOP14-Jul-07 1:49 
GeneralRe: Retrieving Form Element Values (re-worded repost) Pin
JimmyRopes14-Jul-07 4:25
professionalJimmyRopes14-Jul-07 4:25 
GeneralRe: Retrieving Form Element Values (re-worded repost) Pin
#realJSOP14-Jul-07 7:40
professional#realJSOP14-Jul-07 7:40 
GeneralRe: Retrieving Form Element Values (re-worded repost) Pin
JimmyRopes14-Jul-07 7:46
professionalJimmyRopes14-Jul-07 7:46 
GeneralRe: Retrieving Form Element Values (re-worded repost) Pin
DavidNohejl15-Jul-07 2:56
DavidNohejl15-Jul-07 2:56 
GeneralRe: Retrieving Form Element Values (re-worded repost) Pin
Christian Graus15-Jul-07 6:22
protectorChristian Graus15-Jul-07 6:22 
QuestionTEXTAREA Control Pin
hifiger200413-Jul-07 3:46
hifiger200413-Jul-07 3:46 
AnswerRe: TEXTAREA Control Pin
Christian Graus13-Jul-07 3:56
protectorChristian Graus13-Jul-07 3:56 
GeneralRe: TEXTAREA Control Pin
hifiger200413-Jul-07 4:59
hifiger200413-Jul-07 4:59 
AnswerRe: TEXTAREA Control Pin
hifiger200413-Jul-07 5:36
hifiger200413-Jul-07 5:36 
QuestionRegular Expression Confusion Pin
Brendan Vogt13-Jul-07 1:51
Brendan Vogt13-Jul-07 1:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.