JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 3rd, 2001, 08:02 PM
Statik Statik is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 130 Statik User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 25 m 5 sec
Reputation Power: 13
Hiding Javascript Tables/arrays?

Hi,

I'm using Javascript arrays to dynamically check if a username is already taken or not. The probelm is, if you do a view source, the entire table is visible (created from PHP/mySQL) is there a way to hide the array? I can't put it into a .js because of the dynamic array creation.

Any ideas?

Statik

Reply With Quote
  #2  
Old December 3rd, 2001, 08:04 PM
ThreeDee ThreeDee is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Posts: 5 ThreeDee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I don't understand your problem... could you explain in more detail?

Reply With Quote
  #3  
Old December 3rd, 2001, 09:31 PM
Derek Petersen Derek Petersen is offline
Do you like PHP like ME?
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Location: St. George, Utah, of the USA
Posts: 67 Derek Petersen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 12
if your using a Mysql database it should not appear on the page. But if u made it that way just save all the database stuff in a a mysql extension file, and check if the user name is taken or not using php. I don't see another way out of it.
__________________
You know your a web programmer when you see a '$' and think of PHP rather than money.

Reply With Quote
  #4  
Old December 4th, 2001, 06:06 AM
Statik Statik is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 130 Statik User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 25 m 5 sec
Reputation Power: 13
The problem: I wanted to check the username to see if it is already used, at the time of entry, not after submit. So I was using <ON CHANGE> to run a check of the entered username against an array of current usernames.

This works fine in practice, but If you do a view-source, you get to see all the usernames. This is a potential security hole. If I can't hide this array, I have to return to checking the usernames after submit.

Reply With Quote
  #5  
Old December 4th, 2001, 06:26 AM
binky's Avatar
binky binky is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Oct 2001
Location: New Zealand
Posts: 1,774 binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 58 m 15 sec
Reputation Power: 23
Run the checking in a hidden layer/iframe then the user wont be able to see the code. You can essentially run the check as if it was a form submission, reloading a CGI script again and again when the change happens.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Hiding Javascript Tables/arrays?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap