473,327 Members | 2,074 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

regarding url appending

25
Hi,
This is the code snippet,
Expand|Select|Wrap|Line Numbers
  1. function notEmpty()
  2.     {
  3.         {"data-file":"file1.php?p="+act.value+"&q="+inact.value+"&r="+dis.value}
  4.  
  5.     }
  6.  
  7.  
in this, i have to pass these three javascript variables, to file1.php with appending above variable, but problem is that i am getting value of acthf.value variable on file1.php but not getting rest two variables. is there any better solution to append rest variables, i need urgent solution on this can anybody please?

Rushi.
Mar 4 '10 #1
11 1563
Dormilich
8,658 Expert Mod 8TB
I rather suspect to be something wrong with the form element calls, for it has been working for me.
Mar 4 '10 #2
bandy
25
Hi Dormilich,
I am sorry but not better in javascript, but before appending these variables to url, I am printing it to make it confirm that getting values in variables, and getting value of first variable , so more confused on this .

Rushi
Mar 4 '10 #3
Dormilich
8,658 Expert Mod 8TB
if you have a link to the page, I could probably tell you more.
Mar 4 '10 #4
bandy
25
Hi,
OK i tell u what i'm doing,
Expand|Select|Wrap|Line Numbers
  1. function passdata(){
  2. {"data-file":"file1.php?p="+acthf.value+"&q="+inacthf.value+"&r="+dishf.value}
  3. }
see in this function "file1.php?p="+acthf.value+"&q="+inacthf.value +"&r="+dishf.value is the source for the "data-file".
The function will be called on body load event.
Everything works perfect upto this (gets value in variables.)
Here is problem >>>>>
when i go to file1.php, i access these values, like this,
Expand|Select|Wrap|Line Numbers
  1.   $var1 = $_GET['p'];
  2.   $var2 = $_GET['q'];
  3.   $var3 = $_GET['r'];
i get value of $var1 , but i don't get values of $var2 and $var3. i don't understand why it is so? means am i getting wrong in passing values or what.
I will really appreciate your help, please..
Mar 5 '10 #5
Dormilich
8,658 Expert Mod 8TB
dump $_GET and $_SERVER["QUERY_STRING"] to see, if you correctly passed the URL to PHP
Mar 5 '10 #6
bandy
25
can you be specific , what should i do after dumping $_GET in file1.php
Mar 5 '10 #7
Dormilich
8,658 Expert Mod 8TB
look at the dump*

* in case you misunderstood "dump a variable":
Expand|Select|Wrap|Line Numbers
  1. var_dump($_GET);
Mar 5 '10 #8
bandy
25
Sorry to bother you Dormilich, but i tried it with var_dump($_GET['p']) but its giving error.
See, i have to display pie chart. so i am using file1.php as a source file for parameters. so i have to pass these three variables as parameters. appending url is: "data-file":"file1.php?p="+acthf.value+"&q="+inacthf .value+"&r="+dishf.value
see i am getting value of 1st variable in file1.php, but not getting rest two with above code.
am i making mistake in above url, or is there any other way to do this(like split function ).
The page in which i am writing code has action to page itself. is this because of that, if it is so why i'm getting value of 1st variable.
can you make my these points clear.
Mar 5 '10 #9
Dormilich
8,658 Expert Mod 8TB
do var_dump($_GET);, this will show all parameter contents of the URL
Mar 5 '10 #10
bandy
25
JSON Parse Error [Syntax Error]
Error at character 0, line 1:

0: string(1) "1"
getting this error.
Mar 5 '10 #11
Dormilich
8,658 Expert Mod 8TB
what actually you put in the URL??? or rather, where does that output come from?
Mar 5 '10 #12

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

Similar topics

4
by: Bharat Bhushan | last post by:
Hi, I need to generate random bytes for x number of times and keep appending it to a bigger byte array. How can I do this ? for (int lctr=0; lctr < main.Main.NoOfattributes(); lctr=lctr+1){ ...
4
by: bucket79 | last post by:
Hi is there anyway appending to dictionary? list has this feature >>>a = >>>a.append(1) >>>print a but dictionary can't
1
by: dmiller23462 | last post by:
Hey guys.... I put an error-handling in my page and have it posted at the complete end of the code, see below(when people were putting in 's I was getting the delimiter errors). Great, I...
3
by: MLH | last post by:
I have a query, qryAppend30DayOld260ies that attempts to append records to tblCorrespondence. When run, it can result in any of the following: appending no records, appending 1 record or appending...
4
by: John A Grandy | last post by:
could someone explain the following to me : Appending the literal type character I to a literal forces it to the Integer data type. Appending the identifier type character % to any identifier...
6
by: enjoying the view | last post by:
I am working on a school project, trying to build a simple RPC stub generator. The idea is that the generator takes a normal python file with functions defined in it and produces a client and...
2
by: Prabhu Gurumurthy | last post by:
Here is a simple program, which queries /var/log/daemon on my OpenBSD box and gets the list of valid ntp peers. Questions: what is the easiest way for me to create lists on the fly, by that I...
1
by: Frank | last post by:
Hi, Let's say I have a file named myFile.xml Within that file I have blocks of data which I'd like to add at different times during the day. e.g. <LogEntry>
2
by: Adam Atlas | last post by:
I'm trying to figure out if there's any defined behaviour in PEP 333 for instances where an application returns an iterable as usual without error, but that iterable's next() method eventually...
2
by: sarada purkait | last post by:
hii i have to write into a file from the start and then go on appending to it .. i tried using ( ios::out|ios::app) but by this the file keeps on appending every time i run the program and the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.