Peter,
 
No error, no output.  Nothing!
 
Thanks,
Mark

Peter Brunone <[EMAIL PROTECTED]> wrote:
Hi Mark,

   Does "it's not working" mean that the script is outputting the wrong variable, or 
that you're getting a JS error, or that the script isn't being rendered at all, or 
something else...?

Cheers,

Peter

From: Mark E [EMAIL PROTECTED]

All,

I am trying to use Page.RegisterClientScriptBlock() to fire some javascript that wil 
set a value to a control so that I can access it again another javascript function. 
However, it's not working.

Here is the VB.NET code in my code-behind page that is fired on Page_Load:

Session("Current_Special_Amount_Total") = "125"
Dim scriptString As String = " "
scriptString += "document.Form1.HiddenPrizeAmountLeft.value=" & 
Session("Current_Special_Amount_Total") & ""

If (Not IsClientScriptBlockRegistered("clientScript")) Then
RegisterClientScriptBlock("clientScript", scriptString)
End If

And here is the control on my form:

I set the session value to a server control and it's fine. Also changed the 
If statement by adding an else to make sure it was evaluating to true. And
it seems to be.

Since this didn't work, I tried the old classic ASP trick:

var dblAmount = '';

But this yielded the following result in the variable dblAmount:

What I need to do is set a value to the control on the form so that I can
access it via Javascript and do some calculations. I originally coded it
server-side, but the client does not want to post back.

Any help is appreciated.

Thanks,
Mark

[Non-text portions of this message have been removed]


Yahoo! Groups Links

To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/


[Non-text portions of this message have been removed]


Yahoo! Groups SponsorADVERTISEMENT


---------------------------------
Yahoo! Groups Links

   To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
  
   To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
  
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 



[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to