/    Sign up×
Community /Pin to ProfileBookmark

GETing the value of a URL

I am using this function:

function MM_openBrWindow(theURL,winName,features) {
window.open(theURL,winName,features);
return false;
}

Which is called here:

<strong><a href=”http://www.google.com” ” target=”_blank” onclick=”MM_openBrWindow(‘popup.php’,’Popups’,’width=500,height=400′);”> Click here for more information </a> </strong></p>

Google.com is displayed along with a small popup containing a form. This form is used to add links to a database but the url has to be typed in manually.

The code for the form is:

<?php
}
function display_add_bm_form2()
{
// display the form for people to ener a new bookmark in
echo
“<form name=’bm_table’ action=’add_bms.php’ method=’post’>
<table width=250 cellpadding=2 cellspacing=0 bgcolor=’#cccccc’>
<tr><td>New BM:</td><td><input type=’text’ name=’new_url’ value=”
size=30 maxlength=255></td></tr>
<tr><td colspan=2 align=’center’><input type=’submit’ value=’Add bookmark’></td></tr>
</table>
</form>/”

?>

I want the value of the form to = whatever the url of the href is (in the example google.com when they click on the link, so the text field automatically updates with the url so it does not have to be typed in manually.

I figure I need to use: popup.php?url=”google.com”

and then for the form value: value='($_GET[“url”]);’ or something…

But I need the value of url to = whatever the link is in the href as I mentioned. Is there any way I can do that?

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @Lexx87 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...