Tech Talk Discuss PC Hardware, Software, Internet and Other Technology

HTML and scripting help.

Old 09-10-02, 07:41 AM
  #1  
Video Game Talk Reviewer
Thread Starter
 
Canis Firebrand's Avatar
 
Join Date: Dec 1999
Location: Formerly known as "Vryce"/Detroit, Michigan
Posts: 13,857
HTML and scripting help.

Well... Since my knowledge in scripting is limited, I'm trying to learn, I need some help.

I've tried to search and haven't really come up with an example of what I need.

I am building a page and need help with this part of it.

I have 2 buttons.

One button will take the user to a static page. (No problem, thats a simple href link and is done).

The other button needs to be sort of intelligent.

When that button is clicked on, I need a couple things to happen.

1) I need a file created, if the file doesn't exist. Nothing will be written to the file, I just need it created. In a script that loads this page, the file is checked for. And if the file exists, that script won't load the page.

2) I need it to detect what OS version they are running so that I can load a specific page for their OS.

I have encased the buttons in a form, since I assume there is going to be some external file that will be called when the button is clicked. Though, I may be mistaken.

Any help at all is appreceiated.

If need be, I can include the relevent code portion of my html page.

Thanks in advance.
Canis Firebrand is offline  
Old 09-10-02, 08:13 AM
  #2  
DVD Talk Legend
 
Join Date: Jul 2000
Location: chokin' you out in less than 30 seconds
Posts: 10,634
or, you could have the button go to a static page that will determine the browser and os and can forward them from there.

http://www.xs4all.nl/~ppk/js/detect.html
crankyman is offline  
Old 09-10-02, 09:54 AM
  #3  
DVD Talk Gold Edition
 
Join Date: Dec 1999
Posts: 2,708
If you're going to be writing a file to the server, you'll need to use some sort of server side scripting (not sure what kind of script you're referring to) such as Cold Fusion (my personal favorite ) , PHP or ASP. This could also detect which OS they're running with CGI Environment variables.
Lampei is offline  
Old 09-10-02, 09:59 AM
  #4  
Video Game Talk Reviewer
Thread Starter
 
Canis Firebrand's Avatar
 
Join Date: Dec 1999
Location: Formerly known as "Vryce"/Detroit, Michigan
Posts: 13,857
I used the link that Crankyman provided and am now able to detect the OS version.

Now, I just need to be able to build the button to use that variable to display the correct page.

The file I need written, will be written to the client machine, not the server.
Canis Firebrand is offline  
Old 09-10-02, 10:13 AM
  #5  
DVD Talk Gold Edition
 
Join Date: Dec 1999
Posts: 2,708
Well, unless the user is going to give you full control of their computer (which most people won't and shouldn't do unless they're hacked), you won't be able to do this. You also won't be able to read anything from that file on the user's computer. The only thing you can legally write to a user's computer are cookies.
Lampei is offline  

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 On
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Thread Tools
Search this Thread

Archive Advertising Cookie Policy Privacy Statement Terms of Service

Copyright 2018 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.