Solved

Parameters

Posted on 2006-06-29
7
246 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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Introduction:   Welcome to my first article ever. To begin with, the reason I write this article.  I participated in a question on Experts Exchange about the start command in Windows and there were some discussion about the usage. The discussio…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

729 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