Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

remi

3 javascript questions[URGENT]

This topic is 5281 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, i would like to know how to: 1.Get the current file name 2.Get The folder name where "actual" page has been opened from. 3.Retrieve the pressed key On a Key press event(CTRL key for example)? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by Direct
Sounds like homework.

No it's not!
I'm used to program with c/c++(vc++ 6 environment), so i'm not really familiar with javascript. But anyway i have something i would to make in javascript(If you don't mind).

I found that window.location gives the path and the current file name all together, i was wondering if there wasn't something for paths and file names separetely(as in c++).

If you know how to do that why don't you just say it loudly?


[edited by - remi on June 6, 2004 9:16:50 AM]

Share this post


Link to post
Share on other sites
quote:
Original post by remi
quote:
Original post by Direct
Sounds like homework.

No it''s not!
I''m used to program with c/c++(vc++ 6 environment), so i''m not really familiar with javascript. But anyway i have something i would to make in javascript(If you don''t mind).

I found that window.location gives the path and the current file name all together, i was wondering if there wasn''t something for paths and file names separetely(as in c++).

If you know how to do that why don''t you just say it loudly?


[edited by - remi on June 6, 2004 9:16:50 AM]


"Sounds like homework" generally means "I''m too lazy to answer".

However, this question sounds like homework, so...


- CD



// Brought to you by Code_Dark
| DShaw Encryption | Righting a wrong- my contribution to the world.

Share this post


Link to post
Share on other sites
check out www.webmonkey.com, im sure you can find a start there... and a little googling wouldn''t hurt eithor.

-DD

Share this post


Link to post
Share on other sites
Some people in this forum are really making SICK!

Anyway this is what i did and it's working. I dedicate the following line of codes to people who always pretend they know when they don't!

var FullPath = location.pathname;
var i = FullPath.lastIndexOf("\\");
var Path = FullPath.substring(1,i+1);

[edited by - remi on June 7, 2004 3:15:09 AM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!