Solved

Parameters

Posted on 2006-06-29
7
240 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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 to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

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…
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 …
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

760 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now