| Author |
Message |
defibber Hangin' Around

Joined: Apr 17, 2006 Posts: 46 Location: Kansas City Area
|
Posted:
Wed May 31, 2006 3:21 pm |
|
I am trying to create a link in one of the blocks but I was wondering if there is a way to have the link fill out the Log-In information on the page it directs to.
This is what I have been trying. and a couple of other variations. It goes to the site but it does not fill it out.
$content .= "<img src=images/new.gif> <b><big>·</big></b> <a href=\"http://www.emsystem.com?userid=????????,password=????????\">test</a><BR>";
This is the source info of the page I am trying to access.
| Quote: | <form style="display: inline; margin: 0;" name="loginform" action="/EMSystem" method="post" target="_top">
<input type="hidden" name="uc" value="GENERAL">
<input type="hidden" name="nextStep" value="do_login">
<p class="movieText2">User ID
<input type="text" class="input-box" name="userID" tabindex="1" />
</p>
<p class="movieText2"> Password
<input type="password" class="input-box" name="password" tabindex="2"/>
</p>
<p class="movieText2">
<input name="Log In" type="submit" class="submit-button" id="Log In" value="Login" tabindex="3" />
<a href="http://info.emsystem.com/problems_login.html"> Problems?</a>
</p>
</form>
|
Thanks |
|
|
|
 |
montego Site Admin

Joined: Aug 29, 2004 Posts: 7236 Location: Arizona
|
Posted:
Wed May 31, 2006 3:30 pm |
|
Several things:
1) The href you posted is not valid. Maybe you were meaning this instead:
a href=\"http://www.emsystem.com?userid=????????&password=????????\">test</a>
2) In the source code you posted, no values are being given to the two input text boxes. You could try this or some variation thereof:
| Code: |
<p class="movieText2">User ID
<input type="text" class="input-box" name="userID" tabindex="1" value="<?php echo $userid ?>" />
</p>
<p class="movieText2"> Password
<input type="password" class="input-box" name="password" tabindex="2" value="<?php echo $password ?>" />
</p>
|
|
|
|
|
 |
defibber Hangin' Around

Joined: Apr 17, 2006 Posts: 46 Location: Kansas City Area
|
Posted:
Wed May 31, 2006 4:39 pm |
|
I am trying to put the link to in one of the blocks for my site. The emsystem is someone elses site we use to see what hospitals are open. I was wanting to be able to put the link in a "Private" block on the site so people can click on it and it fill out the user name and password.
Sorry for the confusion.
Thanks |
|
|
|
 |
montego Site Admin

Joined: Aug 29, 2004 Posts: 7236 Location: Arizona
|
Posted:
Wed May 31, 2006 5:44 pm |
|
Well, unfortunately, a simple link to it will not do. I thought you were in control over the code. You would need to ask them if there is a way you could do this. |
|
|
|
 |
defibber Hangin' Around

Joined: Apr 17, 2006 Posts: 46 Location: Kansas City Area
|
Posted:
Wed May 31, 2006 5:50 pm |
|
ok Thanks Anyways. I am not sure they would do that. |
|
|
|
 |
montego Site Admin

Joined: Aug 29, 2004 Posts: 7236 Location: Arizona
|
Posted:
Wed May 31, 2006 6:03 pm |
|
There is potentially another way, but not sure it would work. You could place the login page within an iframe under your site and possibly write some javascript to populate the form fields. I think the DOM (Document Object Model) would allow for that... |
|
|
|
 |
defibber Hangin' Around

Joined: Apr 17, 2006 Posts: 46 Location: Kansas City Area
|
Posted:
Wed May 31, 2006 6:10 pm |
|
Interesting. I will have to take a look at that. I haven't worked with Javascript in nuke at all.
THanks |
|
|
|
 |
montego Site Admin

Joined: Aug 29, 2004 Posts: 7236 Location: Arizona
|
Posted:
Thu Jun 01, 2006 7:32 am |
|
You would probably want to create a custom_head.php file to place your javascript code into and place it in includes/custom_files directory. Then you will have to call some function that you have defined to populate the form fields in the iframe. |
|
|
|
 |
|
|
|
|