Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 07-10-2007, 02:03 PM   #1 (permalink)
JohnnyOhhh
Recruit
 
Join Date: Jul 2007
Posts: 2
JohnnyOhhh is on a distinguished road
Help Please!: form populated link with javascript?

Ok, so... Im in the middle of putting together a gadget for windows sidebar and everything upto this point has gone very smoothly (although time consuming). Now I have run into a road block. I would like to avoid using php if at all possible... if I were to use php this is what the code would look like:

Code:
<?php
$cat = $_POST['category'];
$subcat = $_POST['category'];

include ('/resources/' . $cat . '/' . $subcat . '/index.html');
$cat;
$subcat;
?>
then just have the link manifest itself, unfortunately I have NO idea how to do this in javascript and as I am developing a windows "gadget" I would prefer to have it run completely locally.

Last edited by JohnnyOhhh; 07-10-2007 at 02:05 PM. Reason: (I would prefer not to have to get everyone to load PHP onto their machines for my gadget to work!)
JohnnyOhhh is offline   Reply With Quote
Old 07-10-2007, 05:11 PM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,471
sde is on a distinguished road
i don't think there is a way to include files with javascript the way php does.
__________________
Mike
sde is offline   Reply With Quote
Old 07-10-2007, 05:39 PM   #3 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,149
Belisarius is on a distinguished road
You might be able to use a server-side include if PHP isn't available.

Alternately, you could hack the site into a series of frames, and then load the content you want in the frame via javascript.

But, if you want dynamically created content (at least properly), then you need to use some sort of language like PHP.
__________________
GitS
Belisarius is offline   Reply With Quote
Old 07-10-2007, 07:36 PM   #4 (permalink)
JohnnyOhhh
Recruit
 
Join Date: Jul 2007
Posts: 2
JohnnyOhhh is on a distinguished road
yeah... I was afraid of that...
JohnnyOhhh is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript Submit Form Options? Redline HTML, XML, Javascript, AJAX 5 05-19-2006 07:59 AM
looking for code (javascript?) for e-mail link to self for webpage sknewbie All Other Coding Languages 2 10-12-2005 08:25 PM
javascript riddle: why won't my form submit from this text link? sde HTML, XML, Javascript, AJAX 6 09-29-2004 05:56 AM
Using javascript to submit a form sammy HTML, XML, Javascript, AJAX 2 07-15-2004 01:31 PM
Passing form data to PHP with Javascript bdl PHP 5 07-03-2002 10:18 AM


All times are GMT -8. The time now is 09:28 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting