Go Back   Gaming Gutter > Non-Gaming > Programming


Programming - All general programming discussion in here.

» Site Navigation
» Home
» FAQ
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Advertisement
» GG Stuff

Follow us on Twitter!

Get the GG toolbar today (for firefox only)
» Recent Threads
Go to first new post TAKE THE TEST
Yesterday 03:37 PM
Last post by ninopino1
Today 04:29 AM
19 Replies, 133 Views
Go to first new post ~ The Official Hash...
11-06-2009 10:56 AM
by mehike
Last post by Liccy
Today 03:52 AM
890 Replies, 20,195 Views
Go to first new post Happy Birthday Juanstin!...
Today 01:39 AM
by Zombie
Last post by limacon
Today 02:49 AM
2 Replies, 15 Views
Go to first new post MotM February...
03-06-2010 10:28 PM
by Zombie
Last post by Zombie
Today 01:36 AM
20 Replies, 393 Views
Go to first new post Coolest Scratchcard i've...
11-08-2009 12:31 PM
Last post by masumaru
Today 01:33 AM
17 Replies, 599 Views
Reply
 
LinkBack Thread Tools Display Modes

 JavaScipt Assistance
Old 12-10-2008, 01:45 PM   #1 (permalink)
Full Member

Male Starwind237 is offline
 
Starwind237's Avatar
 
Join Date: Jan 2007
Age: 19
Posts: 365
GPoints: 378
iTrader: 0 / 0%
Starwind237 Is Recognizable
Rep Power: 10
Lightbulb JavaScipt Assistance

I've never worked with javascript before.


I have an awesome idea for a program but it has to be done in javascript.

Basically I need to a variable out of the html source

Like this:
<span class="menu_title">Variable</span>

Then have it written to a text file. All automatically.

So, the variable changes based upon the pages source code. And, is then written to a text file.

Sounds somewhat simple but I don't know javascript. I will continue googling but if someone couple help me it would be very appreciated.

EDIT: So I have found out that you cant write to text from javascript. So now I am looking to see if you can forward the variable to php to write it to a file automatically. The key is not needing to click for it to log. Only grabbing the information must be done in javascript.
__________________

Last edited by Starwind237; 12-10-2008 at 03:05 PM..
  Reply With Quote

 
Old 12-11-2008, 08:48 AM   #2 (permalink)
Donor

Male ricky92 is offline
 
ricky92's Avatar
 
Join Date: Mar 2008
Location: Naples, Italy
Age: 17
Posts: 470
GPoints: 13,176
iTrader: 42 / 100%
ricky92 Is a Lord of Awesomenessricky92 Is a Lord of Awesomenessricky92 Is a Lord of Awesomeness
Rep Power: 9
Use document.getElementsByClassName('menu_title')[0].innerHTML to get that, and use XMLHttpRequest to forward that variable to a PHP file (if it's not on the same domain, just load an image with that url, it should work.)
  Reply With Quote

 
Old 12-11-2008, 09:30 AM   #3 (permalink)
G3
I don't never troll

G3 is offline
 
G3's Avatar
 
Join Date: Jun 2009
Location: live? wut.
Posts: 6,915
GPoints: 16,775
iTrader: 0 / 0%
G3 Is MANLYYYYYYYG3 Is MANLYYYYYYYG3 Is MANLYYYYYYYG3 Is MANLYYYYYYYG3 Is MANLYYYYYYYG3 Is MANLYYYYYYYG3 Is MANLYYYYYYYG3 Is MANLYYYYYYYG3 Is MANLYYYYYYYG3 Is MANLYYYYYYY
Rep Power: 30
Quote:
Originally Posted by ricky92 View Post
Use document.getElementsByClassName('menu_title')[0].innerHTML to get that, and use XMLHttpRequest to forward that variable to a PHP file (if it's not on the same domain, just load an image with that url, it should work.)
Yeah, make sure you don't have that class anywhere else on that page because it might get it instead.

If you want I have a grabbetween function.
  Reply With Quote
Reply

Bookmarks



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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


Powered by vBadvanced CMPS v3.1.0

All times are GMT -7. The time now is 04:38 AM.


vBulletin skin developed by: eXtremepixels
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The contents of this webpage are copyright © 2006-2008 GamingGutter.com. All Rights Reserved.

Page generated in 0.19373989 seconds (100.00% PHP - 0% MySQL) with 21 queries