Discussion Forums HTML, XML, JavaScript... |
 |
Software Reviews Editors,Others... |
 |
Top100 JavaScript Tutorials, ... |
 |
Tutorials ASP, CSS, Databases... |
Discussion List FAQ, Roundup, Configure ... |
 |
Authoring HTML, JavaScript, CSS... |
 |
Design Layout, Navigation,... |
 |
Graphics Tools, Colors, Images...
|
 |
Software Browsers, Editors, XML...
|
 |
Internet Domains, E-Commerce, ... |
 |
WDVL Resources Intermdiate, Tutorials,... |
 |
WDVL Discussion Lists, Top 100,... |
 |
| Technology Jobs |
 |
|
 |
Heroes Happen Here Launch Events
Attend the upcoming launch of three powerful new products, take a test drive, meet the teams, and leave with promotional copies of Windows Server 2008, Microsoft SQL Server 2008, and Microsoft Visual Studio 2008. Register here.
»
Install What You Need with Windows Server 2008
Windows Server 2008 is Microsofts most full-featured server operating system yet, so it's ironic that one of its most exciting new features is an install option that cuts out most of the other features. Paul Rubens explores why a Server Core installation makes a great deal of sense in many instances.
»
Simplify Big Business IT for Small and Midsize Companies
Windows Small Business Server 2008 and Windows Essential Business Server 2008 deliver all-in-one solutions to help fuel growth for customers and partners.
»
Q&A with Bob Muglia: Senior VP, Server and Tools Division
Bob Muglia, senior vice president, Server and Tools Division, discusses Microsofts new interoperability principles and the steps the company is taking to increase the openness of its products.
»
Q&A with Lutz Ziob, GM of Microsoft Learning
Lutz Ziob, the general manager of Microsoft Learning, talks about how IT professionals can become certified heroes within their enterprises by getting trained and certified in Windows Server 2008.
»
|
 |
|
|
|
|
|
wdvltalk Roundup July 2002 - Page 27
August 1, 2002
Staying in the realm of JavaScript, what do you feel is the easiest way to
parse URL name-value pairs and then populate a new form with said values?
I'm investigating using a search string, placing the name-value pairs in an
array and then taking the values and populating the aforementioned form. Is
there a more elegant way using JavaScript? I know there are more elegant
ways when using the heavy lifting of real programming languages but I need
to use URL persistence for this one.
-
Below is a JS function I've used to get the parameters from a query string.
Stick it in a page and put this in the querystring for the page:
"
?item1=some%20silly%20string%20of%20stuff&item2=2&item3=3"
(Without the
quotes)
<script language="JavaScript" type="text/javascript">
function getQueryString() {
var args = new Object();
// Get Query String
var query = location.search.substring(1);
// Split query at the comma
var pairs = query.split("&");
var counter = 0;
// Begin loop through the querystring
for(var i = 0; i < pairs.length; i++) {
// Look for "name=value"
var pos = pairs[i].indexOf('=');
// if not found, skip to next
if (pos == -1) continue;
// Extract the name
var argname = pairs[i].substring(0,pos);
// Extract the value
var value = pairs[i].substring(pos+1);
// Store as a property
if (!args[argname]) {
args[argname] = unescape(value);
}
else {
args[argname] += ("&" + argname + "=" + unescape(value));
}
}
return args; // Return the Object
}
var oQS = getQueryString();
// Now, we can access the items:
alert("oQS.item1 = " + oQS.item1);
alert("oQS.item2 = " + oQS.item2);
alert("oQS.item3 = " + oQS.item3);
alert("oQS['item1'] = " + oQS['item1']);
alert("oQS['item2'] = " + oQS['item2']);
alert("oQS['item3'] = " + oQS['item3']);
</script>
In my page using css, I'm trying to avoid the horizontal
scrolling that
appears when I specify the overflow: scroll in my css.
-
Try using overflow:auto. This will produce a scroll bar only where needed,
rather than forcing vertical and horizontal scroll bars as overflow:scroll
does.
I am in a need of a search engine will search through the static
pages of a website and give out results depending on the matching words.
Cool CSS Tips and Tricks
- colored scroll bar effect
html { scrollbar-face-color: #808080;
scrollbar-arrow-color: #ffff00;
scrollbar-base-color: #808080;
scrollbar-shadow-color: #00009d;
scrollbar-highlight-color: #c0c0c0;
scrollbar-3d-light-color: #00009d;
}
-
Colored form button
<form action="/cgi-bin/something" method="post">
Enter your name: <input name="visitorName" />
<br />
<input type="submit" value="Submit" style="color: #FF0000;
background-color: #0000FF;" />
</form>
-
colored form fields
input.blue
{background-color: #B7DBFF;
font-weight: regular;
font-size: 14px;
color: black;}
textarea.blue
{background-color: #B7DBFF;
font-weight: regular;
font-size: 14px;
color: black;}
select.blue
{background-color: #B7DBFF;
font-weight: regular;
font-size: 14px; color: black;}
option.blue
{background-color: #B7DBFF;
font-weight: regular;
font-size: 14px;
color: black;}
-
Just remember that it doesn't work in NN 4.x.
wdvltalk Roundup July 2002 - Page 26
wdvltalk Roundup
wdvlTalk Roundup August 2002 - Page 28
|
|