Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-17-2007, 10:41 AM   PM User | #16
traxion
New Coder

 
Join Date: Mar 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
traxion is an unknown quantity at this point
i got it working

with document.aform.type.value but unafraid i cant call the ajax from any ather way then that way.. we i must live with that

thnx for the help
traxion is offline   Reply With Quote
Old 04-17-2007, 03:42 PM   PM User | #17
david_kw
Senior Coder

 
Join Date: Nov 2006
Posts: 1,000
Thanks: 0
Thanked 0 Times in 0 Posts
david_kw will become famous soon enough
Grats and welcome. :) I'm not total sure what you mean by "unafraid i cant call the ajax from any ather way then that way".

But just in case it is useful, you could also get the form with

alert(document.forms['aform'].type.value);
alert(document.getElementById("aform").type.value);

which would let you do send the name in as a parameter to a function.

Code:
function showUser(str, frm)
{
.
.
.
url=url+"&type=" + document.forms[frm].type.value;
.
.
.
}
david_kw
__________________

www.eXfer.net
david_kw is offline   Reply With Quote
Old 04-18-2007, 03:09 PM   PM User | #18
traxion
New Coder

 
Join Date: Mar 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
traxion is an unknown quantity at this point
Quote:
Originally Posted by david_kw View Post
Grats and welcome. I'm not total sure what you mean by "unafraid i cant call the ajax from any ather way then that way".

But just in case it is useful, you could also get the form with

alert(document.forms['aform'].type.value);
alert(document.getElementById("aform").type.value);

which would let you do send the name in as a parameter to a function.

david_kw
i would also like to (im dreaming:P) call it also true $_GET or $_POST

but then i cant use a form or define it like a form

on anther page i use AJAX just on variable ( $var) and there i can also get the variable from $_GET so i can use both..

i dont now if u got fast a solution for that..?
traxion is offline   Reply With Quote
Old 04-18-2007, 04:01 PM   PM User | #19
david_kw
Senior Coder

 
Join Date: Nov 2006
Posts: 1,000
Thanks: 0
Thanked 0 Times in 0 Posts
david_kw will become famous soon enough
Actually I'm not sure what you mean. $_GET and $_POST are in PHP which is serverside. If you want something dynamic in Ajax then I'd think the serverside variables would not have the values you need.

david_kw
__________________

www.eXfer.net
david_kw is offline   Reply With Quote
Old 04-19-2007, 09:01 AM   PM User | #20
traxion
New Coder

 
Join Date: Mar 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
traxion is an unknown quantity at this point
$proj = $_GET['project'];
if( isset( $proj ) )
{
echo"<script type=\"text/javascript\">showUser('" . $proj . "');</script>";
}

did i make for another page and now can i call the ajax true a form and true index.php?pagina=projecten&project=OCV25-1 project=OCV25-1

so there i use $_GET.. and then call AJAX...

but now the javascript needs document.aform.type.value and i cant fake that true an form

im not very good with javascript so maybe its very easy and i dont see how i can do it..

if its hard to make just forget it my boss is already happy the way it is right now
traxion is offline   Reply With Quote
Old 04-19-2007, 03:13 PM   PM User | #21
david_kw
Senior Coder

 
Join Date: Nov 2006
Posts: 1,000
Thanks: 0
Thanked 0 Times in 0 Posts
david_kw will become famous soon enough
So what value is actually in $_GET['project']?

Or what is the exact URL including the query?

I still don't see why the page can't be built without ajax if you are going to do it that way, but it should be able to be done. Is that value the name of the form?

david_kw
__________________

www.eXfer.net
david_kw is offline   Reply With Quote
Old 04-20-2007, 03:09 PM   PM User | #22
traxion
New Coder

 
Join Date: Mar 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
traxion is an unknown quantity at this point
the value of $_GET['project'] is on project of mine company like OCV25-1 or ESH01 or thinks like that.

the url is than

index.php?pagina=projecten&project=OCV25-1

$pagina is the variable for the page i call and $project = the project is want to see

then i use the code above to call the ajax and see the page with ajax.

the problem is that i got (where u helpt me above here) the ajax ( or ecxtualy js) ask for a document.aform.type.value and document.aform.weekid.value witch i cant fake or create/call with out having to press or change somethings

i will try to explain it next week better.. but now i got some other thinks to do that have more priority

thnx again for the support
traxion is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 03:55 AM.


Advertisement
Log in to turn off these ads.