473,796 Members | 2,688 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

parameter to script

27 New Member
hi
i have my code in ascx.vb file for my javascritpt file function ColSelected in ascx file

LinkButton.Attr ibutes.Add("OnC lick", "ColSelecte d(" + LinkButton.Text + "," + iValue.ToString + "," + iValue2 + "," + Selected.Client ID + ");")


i am getting exception ') ' exception on my click event.
i know i am missig the quatation .can anyone help where i am missing.

i tried
LinkButton.Attr ibutes.Add("OnC lick", "ColSelecte d('" + LinkButton.Text + "," + iValue.ToString + "," + iValue2 + "," + Selected.Client ID + "');")



thanks
Oct 22 '07 #1
2 1022
Plater
7,872 Recognized Expert Expert
When you do this:
LinkButton.Attr ibutes.Add("OnC lick", "ColSelecte d('" + LinkButton.Text + "," + iValue.ToString + "," + iValue2 + "," + Selected.Client ID + "');")

You're assigning that function to take on whatever value is in the Text of LinkButton at the time of assigning it, the same applies for Selected's ClientID. So if any of those values change (or start out as "") then there will be problems because it doesn't change with them.
Oct 22 '07 #2
r035198x
13,262 MVP
hi
i have my code in ascx.vb file for my javascritpt file function ColSelected in ascx file

LinkButton.Attr ibutes.Add("OnC lick", "ColSelecte d(" + LinkButton.Text + "," + iValue.ToString + "," + iValue2 + "," + Selected.Client ID + ");")


i am getting exception ') ' exception on my click event.
i know i am missig the quatation .can anyone help where i am missing.

i tried
LinkButton.Attr ibutes.Add("OnC lick", "ColSelecte d('" + LinkButton.Text + "," + iValue.ToString + "," + iValue2 + "," + Selected.Client ID + "');")



thanks
Check the position of your semi-colon (;)
Oct 22 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
36594
by: JT | last post by:
how can i declare a function that will accept an optional parameter? something like: function newFunc(strValue1, strValue2) --where strValue2 is optional. thanks much.
0
2574
by: LisaC | last post by:
I am using ISQLW in an NT cmd script to call a bunch of scripts to build a database. One of the scripts requires an input parameter. How do I pass an input parameter through the cmd script? Here is my syntax. The first five input parameters specify the database, location of script, login name, password, etc. How do I give spc_Database an input parameter? IF "%1"=="" goto NoParameter IF "%2"=="" goto NoParameter
2
6929
by: Eyal | last post by:
Hey, I would appriciate if anyone can help on this one: I have a java object/inteface having a method with a boolean parameter. As I'm trying to call this method from a javascript it fails on a type mismatch. It is positively because of the boolean(java primitive)parameter. It goes fine if I change this parameter to int or String. This inteface has a lot more methods which works fine, it is just the
2
482
by: wylbur37 | last post by:
I normally use Mozilla 1.4 on Windows XP Pro. As I was developing some test webpages, I discovered that the SRC parameter doesn't seem to work when a path is used with the filename. In one example, when I want to run a JavaScript from an external file (i.e., not inline), I would do the following ... <SCRIPT LANGUAGE="JavaScript" SRC="program.js"> </SCRIPT> If "program.js" were in a different subdirectory than the .htm file
2
2259
by: J Krugman | last post by:
I have a form with a couple of submit buttons, plus a "pseudolink" that is also supposed to submit the form; the submitted form data feeds to a CGI script. The two submit buttons have the name "go_for_it", so that when the form is submitted, the CGI script looks for the value of the CGI parameter "go_for_it". I want the pseudolink to set the value of this CGI parameter prior to submitting the form, but I can't get it to work. Here's the...
2
5399
by: Magnus Blomberg | last post by:
Hello! I am very new to javascripts and wonder if there are any ways to send a parameter from a javascript with window.open. My java code is like: <script language="JavaScript"> function openpic(picid) { window.open("PicContainer.aspx","","width=450,height=400,left=180,top=10"); } </script>
6
1347
by: Tushar | last post by:
Is it possible to have a method that accepts XML document (including processing instruction at top and the root node) as a parameter? Does this parameter need to be defined as type string? I have been given an XML structure to be used in a method call and I am not sure if I should convert that into a C# struct to be used as a parameter type and if so how. The specification says something like ... The input will be an XML such as ... ...
5
7463
by: Ram | last post by:
Hi Friends I want to develope a custom control in .net which can be used with any project. I am writing a function in that class which I want to take any object as parameter. For that I have used Object class as parameter. Now it can take any object as its parameter. But the problem is that I want to access the values of the private or public member variables of the passed object, for which I may have to typecast the Object class...
4
1335
by: 3rdshiftcoder | last post by:
hi- i am having trouble using parameter values in my function and to be honest a little trouble with member variables. i am trying to pass in the argument 'd' representing delete. what the code will do is if it is 'd' it will make a delete query template string. if it is an 'i' then insert query etc.
2
3744
by: Patrick Dreyer | last post by:
Hi, I'm struggling getting a cmdlet with parameter sets working. I'd like to support three different "flavors" for calling my cmdlet Run-SSHCmd: 1) run-sshcmd Command (Parameter set "SharedConnection") 2) run-sshcmd Command SuPassword (Parameter set "SharedConnectionSu") 3) run-sshcmd Command SuUser SuPassword (Parameter set "SharedConnectionSuUser") 1) "run-sshcmd ls" -ok, ParameterSetName = "SharedConnection"...
0
9673
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...
1
10169
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
10003
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
9050
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...
0
5440
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...
0
5569
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4115
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
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2924
bsmnconsultancy
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...

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.