[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Parameters

Posted on 2006-06-29
7
Medium Priority
?
248 Views
Last Modified: 2013-12-25
Hi folks,

  I have a perl script in which I want to use a Session variable from my aspx page.
I have messed with using a html control on the aspx form doing something like this:

                <td><strong>Order ID:</strong></td>
               <td colspan="5">
               <span><label id="OrderId" name="OrderId"><% Session("OrderId")%></label></span></td>

But it errors out and tells me and I have no clue. I know I have done this before and it works...but not this time
 "Property access must assign to the property or use its value"    

So is there another way to get the value in the Perl script??        


and then doing something like this in my perl script

my $orderid =  param(OrderId);

but when I display it, it is always a zero. I know the session("OrderId") has a valid
value, it displays on my aspx page and etc.
any help appreciated
0
Comment
Question by:bearpaws
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 600 total points
ID: 17010209
> But it errors out  ..
who/what is "it"?

> and then doing something like this in my perl script
> my $orderid =  param(OrderId);

to get param(OrderId) in you perl, you need to have it as value of a form tag, like input
labes are not passed to the CGI
0
 

Author Comment

by:bearpaws
ID: 17010459
Okay, I have chnaged my aspx page to the coding below:

<td colspan="5">
 <input id="OrderId" style="WIDTH: 118px; HEIGHT: 22px" readonly="readonly" type="text" size="15" value='<%= Session("OrderId")%>' name="OrderId" />
 </td>


AND my prl script to the coding below:


#my $sel = param(OrderId);

$query=new CGI;
$sel=$query->param(OrderId);


and I have nothing in $sel

So are you saying i need to use something other then type=input?? for a control??
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 17010506
is that HTML snippet what you see in your browser?

please post the form tag you have arround the input tag

0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:bearpaws
ID: 17010559
I did in my previous posting but here it is again (it displays on my aspx page correctly)



<input id="OrderId" style="WIDTH: 118px; HEIGHT: 22px" readonly="readonly" type="text" size="15" value='<%= Session("OrderId")%>' name="OrderId" />


0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 17010828
that's the input tag, where is the form tag?
Also: is this what you see in your browser?
0
 
LVL 48

Assisted Solution

by:Tintin
Tintin earned 400 total points
ID: 17014100
What ahoffman is getting at, is that you need something like:

<form method="post" action="/cgi-bin/yourperlscript.cgi">
<input type="hidden" id="OrderId" style="WIDTH: 118px; HEIGHT: 22px" readonly="readonly" type="text" size="15" value='<%= Session("OrderId")%>' name="OrderId" />
<input type="submit">
</form>
0
 

Author Comment

by:bearpaws
ID: 17014543
well, I found a solution by passing it as part of a querystring and that worked good.
I could not use the form action for posting because a bunch of stuff that had to executed prior to executing the perl script.
I thank you both for your help.
I split the points because you both helped to answer the question.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
This article will show, step by step, how to integrate R code into a R Sweave document
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question