Solved

Parameters

Posted on 2006-06-29
7
244 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
  • 3
  • 3
7 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 150 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
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 

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 100 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

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Changing Audit Policies through scripting 5 69
Can I exclude specific directory with icacle command? 3 56
Powershell File Sort 8 41
Convert .csv to tab delimited text 11 33
In this tutorial I will aim to show you how simple is making a small application in WhizBase, how to add, remove and update data in the DB. I will make a small address book application where you can add, browse, update and remove addresses. I wi…
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
The viewer will learn how to dynamically set the form action using jQuery.

808 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