•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 403,403 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,602 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1253 | Replies: 4
![]() |
how could i call a javascript function through an url like>
i get how to do a link but i need to know if it is possible through an url.
if it is not posible with just javascript, php scripts will do
thanks!
http://localhost/?functionname.params
i get how to do a link but i need to know if it is possible through an url.
if it is not posible with just javascript, php scripts will do
thanks!
toast
•
•
Join Date: Apr 2005
Location: New York state
Posts: 458
Reputation:
Rep Power: 5
Solved Threads: 68
Well you could have the function name as the query key and the parameters as the query value IE.,
Then in PHP
Obviously, that's just an example but that's the jist of it. Not to mention that it is a GIGANTIC security gap. Seriously, you could start a country and form a small army inside that thing
test.com/?doThis=param1,param2,param3Then in PHP
php Syntax (Toggle Plain Text)
foreach($_GET as $key=>value){ $values = split(",",$value); $key($values[0],$values[1],$values[2]); }
Last edited by ShawnCplus : Feb 11th, 2008 at 4:43 pm.
GCS d- s+:+ a-->? C++(++++) UL+++ P+>+++ L+++ !E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r z+*
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r z+*
•
•
Join Date: Jan 2008
Location: Bangalore, India
Posts: 336
Reputation:
Rep Power: 0
Solved Threads: 32
u can call like this:
or
u paste following in url it will work
javascript
alert('hi'))
<html>
<head>
<script>
function Hi()
{
alert('Hi');
}
</script>
</head>
<body>
<a href="javascript:Hi()">Hi</a>
</body>
</html>u paste following in url it will work
javascript
alert('hi')) A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila.
~Mitch Ratcliffe
~Mitch Ratcliffe
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
ajax asp browser cross-browser javascript menu with few lines of code developer development firefox home html internet javascript javascript smooth scrolling scroll smoothly window document position javascript tab menu with rounded corners generator microsoft msdn office prevent javascript menu from getting hidden under flash movies security site software spoof sql url vista web
- How do I declare a class member function in another class? (Python)
- Not a function ... why? (JavaScript / DHTML / AJAX)
- help with creating and calling a function (C++)
- Calling C function from MATLAB (C)
- writing my own MID FUNCTION (Visual Basic 4 / 5 / 6)
- Calling c function from python (Python)
- Moving to Python From PHP: Using a variable in a function (Python)
- Calling function to add HTML to the page (ASP.NET)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: need IE7 help using prototype
- Next Thread: Click URL programmatically



Linear Mode