473,320 Members | 1,982 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,320 software developers and data experts.

Assigning JavaScript variable to a Perl variable

129 100+
Hello friends,
IN modperl we write perl with html,javascript and etc. when we are writing perl code in the middle of javascript and if we want to assign a javascript variable to a perl variable, how it is possible?(Without using Ajax). Urgent friends
Jun 9 '08 #1
3 2377
acoder
16,027 Expert Mod 8TB
Once the page has loaded, Perl doesn't run any longer, so if you want to set a Perl variable to a JavaScript one, you will need to reload the page with the JavaScript value attached to the URL or you can do a form submit with a hidden input field.

Post some code as an example of what you're trying to do.
Jun 9 '08 #2
sasimca007
129 100+
Once the page has loaded, Perl doesn't run any longer, so if you want to set a Perl variable to a JavaScript one, you will need to reload the page with the JavaScript value attached to the URL or you can do a form submit with a hidden input field.

Post some code as an example of what you're trying to do.
Friend,
I don't want to be page refreshed also.
function clk(frm)
{
var sel = document.frm.cat.value;
print <<HTML;
$v = sel;
HTML
I am trying with this code, so it is not assigning.
Jun 10 '08 #3
acoder
16,027 Expert Mod 8TB
If you want to avoid a page refresh, you'll have to use Ajax or (i)frames. Perl cannot run on the same page once it's loaded in the way you want it to.
Jun 10 '08 #4

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

Similar topics

2
by: pleaseexplaintome | last post by:
Hi I have the following perl/cgi script snippet. The goal of this script is to pass a javascript variable to perl where it can be re-used later. Any help is appreciated, Thanks ...
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...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.