Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > Client Side Scripting
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 03-08-2010, 04:24 PM
  #1
rabove
Novice (Level 1)
 
Join Date: Mar 2010
Posts: 3
iTrader: (0)
rabove is an unknown quantity at this point
VBScript: Variable management

I'm continuing to learn and research VBScript, but in the meantime, I figured I'd reach out for some help with something I'm trying to do. This is a smaller piece to a larger project I'm working on for an internal site at work.

Code:
<html>
<head>
<SCRIPT LANGUAGE=vbscript>
<!--
OPTION EXPLICIT

Dim leeDate
Dim leeTime
Dim leeMonth
Dim leeDay

     Sub buttonLee_onclick
     leeDate = Date()
     leeMonth = (DatePart("m",leeDate))
     leeDay = (DatePart("d",leeDate))
     leeTime = Time
document.write(leeMonth & "/" & leeDay & " at " & leeTime)
End Sub     
-->
     </SCRIPT>

</head>

<body>

<BR>
<INPUT type="button" value="Update" id=buttonLee name=buttonLee>

</body>
</html>
What I'm attempting to do is use the Update button to simply update the time/date information of the variables and then reprint them out. What the above does is display the button, and once clicked, the document.write.

I've tried multiple ways of doing this, and I finally stopped at this version. I'm not completely grasping how variables are managed and updated. With a language like, C, as an example, or a script run locally on a computer, I get how to do this. But within a website/HTML code, I'm lost. I tried having the document.write portion below using script tags, but having all of the variable = "" declaration stuff wasn't updating the document.write. Should I be using some sort of loop function here to reprint to screen based on updated variable values?

Any help would be great, or even resources for information. I have a couple sites I'm reading over now and, like I said, will keep trying different things until I get it.
rabove is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 03-08-2010, 04:45 PM
  #2
rabove
Novice (Level 1)
 
Join Date: Mar 2010
Posts: 3
iTrader: (0)
rabove is an unknown quantity at this point
To add a bit more information of the "larger" project, which is still fairly basic I'm guessing, I want to create a multi-user status page. I'll explain more, haha.

I'm in a team of 7 people. We are using an internal SharePoint site. I've set up one of the web parts to point to a web page. What I'd like on that page is each technician's name with a dropbox below, indicating their status. So, if they leave the room for lunch, bathroom, meeting, etc. they can simply select their status from a drop down menu and click update. I'd like this to not only update their current status, but post a time stamp as well so others can see when their status was updated.

As a further example, it'd be laid out kinda like:

Person's Name
Timestamp
Option Menu
Update Button

So once I figure out how to store/update variables and reprint (time stamp) for this piece, I'll have to figure out how to store the value of the option selection as well, WHILE also making it viewable to multiple people on multiple computers.
rabove is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 03-08-2010, 06:41 PM
  #3
rabove
Novice (Level 1)
 
Join Date: Mar 2010
Posts: 3
iTrader: (0)
rabove is an unknown quantity at this point
So, the more research I do, it seems as though using ASP applications would be better, as it would allow me to store more "global" application variables that could be accessed and changed by multiple pages.

I'm now testing this theory and will report back.
rabove is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Reply
KEEP TABS
SPONSORS
 
Boxedart

 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  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
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 05:41 AM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.