![]() |
Add Values to URL
Hi guys! I'm pretty much lost when it comes to javascript and I'm hoping somebody can help me. What I have is a form that when the "Do URL" button is clicked, it drops the url into the text field. But now I want to be able to add values to the url when the "Do URL" is clicked. This is what the url would look like:
Code:
http://yoohoo.com/login_whatever.php?username=USERNAME&password=PASSWORDhttp://area52.heliohost.org/misc/url_form.html Thanks for any help. |
Making it way way way too hard.
No JavaScript needed, at all. Boiled down to the bare essentials: Code:
<form method="get" action="http://yoohoo.com/login_whatever.php">If you don't need/want it, then omit it. |
I wish it were that simple, but I really need the javascript to place the username and password inside the url. I fully understand what your saying, but that won't work for this particular application.
Quote:
Code:
function doIt(v_al)Code:
<input type="text" name="u" size="25">Code:
http://yoohoo.com/login_whatever.php?username=USERNAME&password=PASSWORD |
So you aren't showing us real code?
Because *clearly* this <form> is useless: Code:
<form action="" method="post" name="theform">Code:
http://localhost/dearabby/junk1.html?u=http%3A%2F%2Fyoohoo.com%2Flogin_whatever.php%3Fusername%3Dasdfa+asdf%26password%3DNAX234&submited=Go&username=asdfa+asdf&password=NAX234SO... It would help if you would use *REAL* code instead of giving us fake code that is somewhat meaningless. I would *GUESS* that what you are really after is *SOMETHING* like this: Code:
<html>No? |
Whatever values you set in the form from JavaScript will need to be redone on the server after the form is submitted for those people without JavaScript so you should get that version working first and then decide if there will be sufficient time saving for those with javaScript if you implement something in JavaScript.
|
Quote:
Code:
https://www.fastmail.fm/?dologin=1&page=m.html&interface=html&screenSize=mobile&hasPushState=0&username=USERNAME&password=PASSWORDLOL it wasn't that I was hiding anything, it was just to much to have to explain. Quote:
|
Sorry, I didn't mean you were trying to conceal stuff from us, just that there was no way the code, as you showed it, could work.
It still can't work as you showed it, if the page you showed us really is an HTML page, for the reasons I gave you. But hopefully now you can use some of what I showed to make it work? |
The proxy is a php page. The page I posted was just an example of what's on the proxy page. I really didn't want to post the proxy nor would you have been able to view it unless I changed the htaccess to allow more than webtv people. Anyway the code you posted works perfect for my application! :)
|
| All times are GMT +1. The time now is 08:34 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.