Solved

Parameters

Posted on 2006-06-29
7
245 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 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
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 

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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
This article will show, step by step, how to integrate R code into a R Sweave document
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…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …

733 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