HighTechTalks DotNet Forums  

Include variable values from a webform when calling/creating a client side script in code

Dotnet Scripting microsoft.public.dotnet.scripting


Discuss Include variable values from a webform when calling/creating a client side script in code in the Dotnet Scripting forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Neal Rogers via .NET 247
 
Posts: n/a

Default Include variable values from a webform when calling/creating a client side script in code - 03-18-2005 , 05:41 AM






Hi

How does one pass a variable-value (UID beneath) into a script from server side code

I get "error UID is undefined."

Too few / too many dbl Quotes ??

eg
Dim Uid As String = sDay & iPeriod & iItemNum & "_click"

strClientScript = "<script language=""javascript"">" & vbCrLf & "function " & Uid & "() {" & vbCrLf & _
var x = window.showModalDialog(""dcontent2.htm""," & Uid & ...etc


it's for a generic / create-multi jscripts DatGrid application..

(trying to create scripts for each new ListItem added to a listbox in a dgrids columns);;;

This , provided i treat uid as a value in the script more quotes around it, ..works for a once off

TIQA
NEal

code beneath...
strClientScript = "<script language=""javascript"">" & vbCrLf & _
"function " & Uid & "() {" & vbCrLf & _
"var x = window.showModalDialog(""dcontent2.htm""," & Uid & ",""dialogHeight: 150px; dialogWidth: 300px; dialogTop: 300px; dialogLeft: 400px; edge: Raised; center: Yes; resizable: No; help: No; status: No;"");" & vbCrLf & _
"}" & vbCrLf & _
"</script>"

--------------------------------
From: Neal Rogers

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>i7+0z60w90ybEZvUIdJcpg==</Id>

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.