473,804 Members | 2,747 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sending multiple variables at once to a .js page

bugboy
160 New Member
Hi I'm using an <input type="submit"> to send variables to a js page when clicked.
The code bellow allows me to send 3 variables to the js page.. is there a way to add more variables the the tag that will be passed along?

Or can i have it send along a <input type="hidden" value="var4"> tag like a normal form?

Thanks

Bug Boy

[HTML] <input type="submit" title="A" name="B" value="C" onclick="edit(t his.value,this. name,this.title )/>[/html]
Apr 10 '08 #1
3 1599
acoder
16,027 Recognized Expert Moderator MVP
edit() would be a JavaScript function. Can you post the code for that function?
Apr 10 '08 #2
bugboy
160 New Member
I've got it figured.. I didn't understand how functions worked. i just added another variable then caught it on the js page by adding it there as well and modifying the header creator to pass it with the URL. it took some time to figure out the escaping forward slashes on the single quotes around the new variable because the "this.title " didn't use quotes but direct variable values need them. like this:

(ps a bug is preventing me from putting the closing tag on the below code and is also chopping off any text i put after it..)

Expand|Select|Wrap|Line Numbers
  1. edit_refine_menu(this.value,this.name,this.title,\'var4\')
Apr 10 '08 #3
acoder
16,027 Recognized Expert Moderator MVP
I've got it figured.. I didn't understand how functions worked. i just added another variable then caught it on the js page by adding it there as well and modifying the header creator to pass it with the URL. it took some time to figure out the escaping forward slashes on the single quotes around the new variable because the "this.title " didn't use quotes but direct variable values need them.
You wouldn't need them if you use single quotes within double quotes.
(ps a bug is preventing me from putting the closing tag on the below code and is also chopping off any text i put after it..)
Yes, I noticed your post in the feedback forum.

Anyway, glad you've got it sorted.
Apr 10 '08 #4

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

Similar topics

11
4979
by: Ohaya | last post by:
Hi, I'm trying to understand a situation where ASP seems to be "blocking" of "queuing" requests. This is on a Win2K Advanced Server, with IIS5. I've seen some posts (e.g., http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=Tidy7IDbDHA.2108%40cpmsftngxa06.phx.gbl) that indicate that ASP will queue up requests when they come in with the same "session".
11
2868
by: ColinWard | last post by:
Hi. I have the following code in a module which sends email via Outlook. Option Compare Database Option Explicit ' Declare module level variables Dim mOutlookApp As Outlook.Application Dim mNameSpace As Outlook.NameSpace Dim mFolder As mapiFolder Dim mItem As MailItem
3
1009
by: Eje | last post by:
Hi, I'm building an application where other companies redirect users to our application. I need the redirecting company to attach a code telling me who is redirecting. I've seen url:s with a querystring at the end. That would suite me fine but how do I send such a message and how do I catch the message when the user is redirected to our homepage? Eje
7
3523
by: Lau | last post by:
I need to send 1000 emails from an asp.net website. Normally I would use System.Web.Mail.MailMessage() to send thru an SMTP server. But the large amount of emails results in a timeout. My server administrator told me to write the emails to the “pickup directory” instead. I know that JMail can do this in ASP, but how do you do this in asp.net? -- --------------------
9
2443
by: jsale | last post by:
Hello, I am having a problem with multiple users using my asp.net application - namely that if each user clicks save at the same time, some, or all, of the users crash out. Do I need to do anything in particular to 'queue' their requests or should asp.net do this? Any help would be very useful, jsale
3
2796
by: Nathan Sokalski | last post by:
When I view any page in my application a second time, I recieve the following error: System.Web.TraceContext.AddNewControl(String id, String parentId, String type, Int32 viewStateSize) +313 System.Web.UI.Control.BuildProfileTree(String parentId, Boolean calcViewState) +201 System.Web.UI.Control.BuildProfileTree(String parentId, Boolean calcViewState) +263
6
482
by: Bill | last post by:
Hi I am trying to get my listbox items to print if they stream past the one page mark. my code is working for one page of information (if the e.hasmorepages) is not there. But I am having trouble getting it to print on multiple pages. The second page will not print at all. Thanks in advance
13
8679
by: Samir Chouaieb | last post by:
Hello, I am trying to find a solution to a login mechanism for different domains on different servers with PHP5. I have one main domain with the user data and several other domains that need a login to show data. I want the user to login only once when he visits any of my domains.
4
14109
by: Kurrent | last post by:
I have some data from text fields that are being passed over through a form that I am displaying with the $_POST superglobal. Once i have echo'd out this data onto the next page, i'd like to continue to use it on the next page. I haven't figured out how to do this properly just yet, but I'm guessing it has something to do with sessions. I have MANY variables being passed (over 100) and I'm hoping i don't have to register each one of these...
0
9711
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, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9591
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,...
0
10594
Oralloy
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...
1
10331
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
10087
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...
1
7631
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5667
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4306
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 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.