CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Button Link Revisited

Print topic Send  topic

Author Message
datadoit.com
Posted: 07/12/2004, 2:56 PM

Hi all, I'm reposting this as I'd really love to be able to press my
buttons. :)

<LastHero@forum.codecharge (Last Hero)> wrote in message
news:540ed164a9fe97@news.codecharge.com...
> >How would that 'uid=10000' be dynamically attached?
> add label component(in html mode):
>
> .. onClick =
"JavaScript:parent.location('newpage.php?uid={label_uid}');...
>
> and set value for this label in BeforeShow event.
>

Okay, here's what I've done:

1. Placed a label on the page called TestLabel, and assigned it a value in
BeforeShow:
$TestLabel->SetValue("TestValue");

2. Placed a button on the page, which looks like this in HTML mode:

<html>
<head>
<title>JavaButtons</title>
</head>
<body>
<p>This page will test Java action buttons.</p>
<p>{TestLabel}</p>
<p>
<!-- BEGIN Button Button_URLParam --><input
onclick="Javascript:parent.location='JavaButtons2.php?Test={TestLabel}';"
type="submit" value="Button with URL Param" name="{Button_Name}"
language="javascript"><!-- END Button Button_URLParam --></p>
</body>
</html>

I see the assigned TestLabel value on the page just fine. However, the
value of TestLabel is not getting passed in the URL. What am I missing or
omitting? Thnx.

-MikeR


NixMarl

Posts: 12
Posted: 08/27/2004, 9:56 AM

Wouldn't {TestLabel} in
Quote :
onclick="Javascript:parent.location='JavaButtons2.php?Test={TestLabel}';"
be {$TestLabel} instead?
View profile  Send private message
DaveRexel

Posts: 50
Posted: 08/27/2004, 2:19 PM

::
I had the same problem as datadoit.com and solved it as follows

<html>
<head>
<title>JavaButtons</title>
<script language="javascript">
function doMyClick()
{
parent.location='JavaButtons2.php?Test={TestLabel}';
}
</script>
</head>
<body>
<p>This page will test Java action buttons.</p>
<p>{TestLabel}</p>
<p>
<!-- BEGIN Button Button_URLParam --><input onclick="javascript:doMyClick();" type="submit" value="Button with URL Param" name="{Button_Name}"><!-- END Button Button_URLParam --></p>
</body>
</html>

_________________
/Dave
RexDesign CodeCharge Studio Tutorials
http://rexdesign.com/ccs/
View profile  Send private message
datadoit.com
Posted: 08/30/2004, 12:12 PM

I ultimately solved this by assigning a value for {TestLabel} into a global
template variable ('SetTag'), per recommendation from the sixto person.
Using this method all over the place now with great results. SetTag = very
powerful.


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.