•
•
•
•
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 374,436 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 3,138 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: 6528 | Replies: 1
![]() |
•
•
Join Date: Jun 2005
Posts: 7
Reputation:
Rep Power: 0
Solved Threads: 0
Hello,
I've a question: I don’t know much, so please bare with me.
http://www.site.com/upload.html?dirname=abc
I want this querystring value (abc) into <input name="dirname">
<script type = "text/javascript" language = "Javascript">
<!-- Hide from older browsers;
{
var qPos = document.URL.indexOf('?');
dirname.value = document.URL.substr(qPos);
}
// end hide -->
</script>
I have tried with this code but unable to get the results.
[upload.html form]
<form ENCTYPE="multipart/form-data" method=post action="http:// www.site.com/cgi-bin/upload.cgi">
<td width=30% align=right><b><font face="arial" size=-1>Directory Name:</font></b></td>
<input name="dirname" size=30>
</font></td>
</tr>
Any Help Please?
I've a question: I don’t know much, so please bare with me.
http://www.site.com/upload.html?dirname=abc
I want this querystring value (abc) into <input name="dirname">
<script type = "text/javascript" language = "Javascript">
<!-- Hide from older browsers;
{
var qPos = document.URL.indexOf('?');
dirname.value = document.URL.substr(qPos);
}
// end hide -->
</script>
I have tried with this code but unable to get the results.
[upload.html form]
<form ENCTYPE="multipart/form-data" method=post action="http:// www.site.com/cgi-bin/upload.cgi">
<td width=30% align=right><b><font face="arial" size=-1>Directory Name:</font></b></td>
<input name="dirname" size=30>
</font></td>
</tr>
Any Help Please?
•
•
Join Date: Aug 2005
Posts: 20
Reputation:
Rep Power: 3
Solved Threads: 0
To get input like you want you should use html and perl (or any other lang)
this makes some.html?file=text&file2=text2
------some.html--------- .... <form method=get action='some.pl'> <input type=text name=file value=text> <input type=text name=file2 value=text2> </from> ....
this makes some.html?file=text&file2=text2
-----some.pl------
....
$tempbuffer=$ENV{'QUERY_STRING'}; #reads file=test&file2=text2
....
#then you just split them up and do something![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
- how to hide querystring in asp.net2.0 (Python)
- Problem with querystring trimming (VB.NET)
- About querystring (PHP)
- can i retrieve the break tag from querystring? (HTML and CSS)
- Help with Querystring error (PHP)
- Requesting Querystring (ASP)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Preselection of stored value in an input control of a form
- Next Thread: Web server time


Linear Mode