Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    ASP




Changing Vbcsript To Javascript


I could not find the equiavalent code of following in javascript, pls advise if you know? my Vbscript is as follow:

<script type="text/vbscript">
function save()
for each text in frm1
if text.value="" then
alert ("please Fill All The Required Fields")
exit function
end if
next
</script>




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Changing
Last week I posted in the graphics forums regarding a photo I have that I needed to slowly change from day to night.Now I have the various stages, I need them to display on my site, according to the time of day.For example:

Between 5am and 7am display the early morning picture
Between 7am and 5pm display the day picture
Between 5pm and 7pm displayy the evening picture

and so forth.

Changing Domain
I'm having a domain change foisted upon me and the test I did resulted
in every last ASP and
ASP.Net script stopping cold. Nothing but plain old html worked.
Is there a FAQ or some other document available that outlines what has
to be done when the
IIS server machine is disconnected from one domain controller and
reconnected to a totally different one? If not, does anyone here know
what would have to be changed to make the ASP code play nice in the new
domain?A relevant bit of info, they're also changing the name of the
administrator account. I don't know if that would contribute to the
death of ASP* on the system, but it might.

Changing Date
i have an insert record and edit record page. When inserting to the db, it uses now(). When I go to edit an existing record the date stays as the original date. How do I make the date change to the amended edit date?

Changing Order
I have used ASP for years using MS Access and have used MSSQL quite a lot as
well. I have never came across something like this before.

MSSQL table names and types:

ProductName nvarchar
ShortDescription nText
ThumbNail nvarchar
etc

When I have the recordset in the order as follows, all works well:
(Recordset2.Fields.Item("ProductName").Value)
(Recordset2.Fields.Item("ShortDescription").Value)
(Recordset2.Fields.Item("Thumbnail").Value)

Though if I have the Thumbnail first the description does'nt show.


Changing Labels
how best to convert an application which is all in English to be able to roll the app out to say Germany or France and it all appears in the correct language

Changing Frames
My site uses frames.I have a header frame, a menu frame and a main frame. When the page opens, the header frame and the main frame are generic. The main frame has a log-in dialog. Once the user logs in, they are taken to a 'main' page and I want to replace the header and menu frames with other frames .

Changing Column
I need to set up an HTML table or the like, with 4 columns.
Each column needs to have a header with a FRIDAY (dd/mm/yy) date.
i.e. this weeks Fridays date is 16th Feb, the following is 23rd Feb
etc.
So, I need column 1 to be headed 16th Feb, col 2 to show 23rd Feb etc.
As this week passes, the dates need to move up 1 week, so that next
week, col 1 will display 23rd Feb and so on.
These headers need to change according to the date.
Please can you advise how I best achieve this ?

Display Changing
I was talking to someone back at Uni. He showed me his web site. He had - and + to increase the size of his web page or to decrease it so the user can always see everything on screen.
He did it in asp. I'm interested to know how it was done.Does anybody know how to do this?

Changing Text Box Value
I have two textbox in the form. what i want to do is update the second text box based on the sponsorid entered by the user. I want to display the member name based on the memberid which is retrieved from the database on the bases of entered sponsorid by the user.

i extracted all the data when the page loads from the database but unable to call it on blur event of the text box. The variables cannot be accessed in the vbscript because these are for server side and not accessable on the client side. What is the way around this problem.

SessionID Keeps Changing?
When I create a simple page with this code, the sessionID shows differently
each time I refresh the page.

On every other refresh it is blank, on every other, it is new. What is
happening here?

Dim sessStr as String
sessStr = Response.Cookies("ASP.NET_SessionId").Value
Response.Write("Session ID=" & sessStr)

Changing The Port (80) Of IIS
i am running iis and apache both.now i want to change the port of iis to e.g 70.how can i change it?

Changing Character
I want to convert the first character to Upper case, while the rest remain lower case.

variable = lcase(left(blablabla,9))

let say now the "variable = abcdefghi"

How can I convert ONLY the first character to uppercase?so that the variable will be holding "Abcdefghi" ?

Changing Password In ASP
i want to know how to change the password or replace it with new password and for more details see the attachment. note that i am using Dream weaver for development and Access database to save users information.

Changing The Path
we use the indexserver to index serveral files on the files server witch are then searchable thru our intranet. all of that works fine, but the indexserver get the local path to the files witch is E:datenpath ofile.doc for instance. there is an option for getting a relative path, but that just throws out the path to the form that we use to search the katalog. how would i go about changing the above path from file://e:datenpath ofile.doc to file://n:path ofile.doc?

Changing Domain
I have domain name, eg www.abc.com. Use the Dynamic DNS web site to register. How the IP of www.abc.com. can be shown once I click The Domain Name,e.g.click http://www.abc.com.

Then show http://123.123.123.123

Is it the ASP program can help me? or any other solution.


Changing Text From DB
I am running a marquee across the top of my page. The text for the marquee is initially loaded from a SQL Server Database. However, as users look at this page the text may be updated by an administrator of the site.

To account for this, I tried to use VBScript to code the onstart event of the marquee. In the script I was trying to check for updated text but I don't believe it is possible as it seems the database code only runs on initial loading of the page. Any ideas on how to requery the database for the updated text?

Title Tag Changing
I run a site using a blog script (dblog) where if you want to open an article from the homepage, it links to a page called article.asp. For example if I want to open article 101 the link goes to article.asp?article=101 but the title (the metatag) is always the same.

What I want to do is having the title change from article to article, retrieving it from the database. So if I open article.asp?article=101 the <title> displays the title of the article 101.

Changing The Name Of Cookie Session In ASP
Does anybody knows how to change it?

Instead of ASPSESSIONIDQARCQQSC I want to change to "ASPSERVER1" for example...

Displayed Images Not Changing
I have a page that displays images. However, at times if I have changed the actual image but have kept the same name and src, the old image still displays when I run the page. I have cleared the files and cookies and sometines this helps but not always.

Is there something I can do to force a change?

Changing Time Locale.....
I am using:

<%
Locale = Session.LCID
Session.LCID = &H1033
Response.Write FormatDateTime(Time)
Session.LCID = Locale
%>

as I am hosted on a US server, but I need to display the time in GMT. This code still displays the server time though. Would it be better to just display <%=Time()%> and then knock 5 hours off the US time? If so, would <%Time(-5)%> work?

Application Variables Changing
users login and can navigate an administration area, however, at random (it seems) when you click on a link to navigate to another spot in the admin portion the application variable used to denote the user as an admin is getting changed, and therefore load the homepage because it thinks you are not logged in. any suggestions? need more info?

Changing The Data Automatically
I have a page shows the news from the database, normal thing. but how can we make the latest news show after 24 hours, since the shown one will remove from the page and the newer will appear.

Changing Default Weekday
By default, Weekday setting starts on sunday which is 1. How can I change to
use Weekday to start on monday?

Changing Order Of Pages In An Asp CMS
I am currently building a CMS using asp and Dreamweaver behaviours. All is going well and I can add, edit and delete pages. However I need some advice on how I can give the user the option of changing the order that the pages are displayed within the navigation menu.

I’ve seen this on other CMS’s where the pages are displayed as a recordset on a page with a button next to each of the rows entitled ‘move up’ and ‘move down’. Then when any of the buttons are clicked the action is performed and the page is refreshed i.e. the selected page is moved up or down. Please could someone show me how this is done as being more of a web designer this issue is proving to be quite tricky for me?

Changing Image At Certain Times
im making the web site for a small internet radio station and would like to add the feature to show which DJs are currently on air. I would like to do this by swaping an image at certain times or even dates.

For instance

dim image

if time = 05:15:00 then image = bob else
if time = 23:30:00 then image = dave
end if

Something along those lines but I dont know the exact code required to do this.

Would be really greatful for any help, I think it would be a nice feature for our listeners.

Changing Font Size
i would like to be able to increase font size globally, at the click of a mouse within a site. Does any one have the script basics for this. ie. how is a 2nd style sheet called etc

Changing Application Variables
i would need to know if i can permanently modify the content of the global.asa file.

I am writing a web log in form that enables users to change their password (i dont need much security, this is more for practical purpose so i use application variables), these passwords are defined in the Application_OnStart() event but i would like to be able to change them without having to manually rewrite them.

Changing A Form Variable
I know you can call a Form Variable in a VBscript using
Request.Form("FieldName") and make equal a local variable like:

str = Request.Form("FieldName")

Now if do this:

str = "This is the new value"

How do you make FieldName equal str. So In a sense I want this to happen

FieldName = str

I need this so that when FieldName gets posted to the DB the new value get
sent.

Drop Down Menus And Value Changing
I have an asp form that submits information to a database. On this form, I have a drop down box with about 15 options, each with thier own value. The selection is down a bit in the form, after user fills out certain information.

On the same form, I have a hidden value stated for "assigned_to" field. Most of the options in my drop down menu need an "assigned_to" value=35 and one option needs an "assigned_to" value=40 . How can I do this?

Changing Track Numbers
Imagine a CD of say 20 songs. Each song is a table row

[Title] [Artist] [TrackNo]

I need a way for the user to change the way the songs are listed by allowing them to change the track numbers. What is the smartest way to do this? I think it would be kind of trick to have a couple of <IMG> up and down arrows per each song. The user would click on either the up or down arrow to move the song accordingly. But I don't know how to go about that. Whatever variables are passed, the process would have to check to see if there is another track# +/- 1 each time.

Then I thought maybe it would be easier to just list the songs with a form box next to each song where the user manually entered the desired order,then submit the form. But that also has it's share of issues like checking for existing track numbers, users who can't count,etc.


Changing Order Of Recordsets
I have used ASP for years using MS Access and have used MSSQL quite a lot as well. I have never came across something like this before. MSSQL table names and types:

ProductName nvarchar
ShortDescription nText
ThumbNail nvarchar
etc

When I have the recordset in the order as follows, all works well:
(Recordset2.Fields.Item("ProductName").Value)
(Recordset2.Fields.Item("ShortDescription").Value)
(Recordset2.Fields.Item("Thumbnail").Value)

Though if I have the Thumbnail first the description does'nt show.

Changing Date Formats
It is switching between American and European date formats - this is causing problems on the page which use the Date function. Most of the time the page works ok but sometimes it seems to switch formats and this messes up the code on the page.

I have spoke with the people who look after the servers on which the site runs but do not know what is causing this. They have not made any changes to the date format of these machines. The website and the database are kept on different servers. Has anyone came across this problem.

Response.Redirect Not Changing URL
In file FIRST.ASP, I've got
<%
Response.Redirect "SECOND.ASP"
%>

The redirect is happening, and I'm seeing the content from SECOND.ASP in the browser,
but the URL in the browser is still saying FIRST.ASP. why this is happening and how I can insure the browser displays SECOND.ASP? I'm using IE6.

Changing Ordinal Position
how to change the ordinal number of a field and the field datatype in Access using ASP?

Changing The Background Color
how to change the background color of a web form programatically from C#. I have found examples on the web for Visual Basic, but I can't get them to work in C#.

Changing Default Folder
I have installed IIS on win XP pro. however I cannot find a control panel like PWS on w2k to change default folder. How do I do that?

Changing Tables Names
I wanted to know if it is possible to change MSAccess Tables Names through ADO in ASP. is it?

Changing Server.MapPath
I have just changed host and I need to change my Server.MapPath to comply with my new host db folder . Currently I have my path set to

Server.MapPath("db/access.mdb")

but I need to move it back up a few folders so it is above the "www" folder in the new hosts specified db folder. How do I achieve this?

Problem Changing The Cookie Via A Href
I am currently setting a cookie that has a variable which is based on the user's bandwidth (High or Low is set by a javascript detection script). However, I'd like to also give the user the option of manually choosing their bandwidth variable (High or Low).

The problem I'm having is being able to change or write the dynamically set cookie to the user's manual preference.

instead of doing this which sets the cookie and redirects the user when the page loads....

Changing Page Title With Includes
I have one comment before I begin. An ASP Forum site using PHP, doh.

All of my pages begin like this:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html><head><!--#include file="header.htm"-->

<link href="css.css" rel="stylesheet" type="text/css">
<title>Some page</title></head>

I saw a friend change all of the titles using a code that looked something like :
<%pagetitle = "Title" %> In the header document. My question is where does this go in my header document and how do I reference it in all of my other pages?

Changing Session.LCID In A Hyperlink
Is it possible to change the Session.LCID in a hyperlink? My problem is I'm calling a Date from a database to use as a querystring in the hyperlink but I also need to display the date as output from the hyperlink.

I need to have to querystring in Session.LCID = 1033 and the display date in
Session.LCID = 2057. Code:

Changing The Action On A Form Before Submitting
I want a form to submit to a different page depending on what selection has been made in a dropdown option box. However something is going wrong my code looks as follows: Code:

Changing File Name Of Uploaded Photo
I've got the following code to upload photos and save in a folder:

<%
Dim objUpload
Dim strFileName
Dim strPath

' Instantiate Upload Class
Set objUpload = New clsUpload

' Grab the file name
strFileName = objUpload.Fields("File1").FileName

' Compile path to save file to
strPath = Server.MapPath("Uploads") & "" & strFileName

' Save the binary data to the file system
objUpload("File1").SaveAs strPath

' Release upload object from memory
Set objUpload = Nothing
%>

The problem is it saves with the original file name but I want manipulate it and save it with a name defined by me as if not a user that download a photo with an existing name in the folder it will re-write.

Changing Ordinal Position And Datatype
Does anyone know how to change the ordinal number of a field and the field datatype in Access using ASP?

Changing Font Size On <Select> Tag
Is there a way that I can reduce the size of the font on the <select> html
tag? The reason is I have a data that have almost 100+ characters.

Changing The Current Region Of Asp.net Account
How can I change the culture/region of the machines ASPNET Account??? In
code, I can set it for the threat manually by using
system.threading.thread.currentThread.currentUICul ture, but there must be a
way to do it global on the machine: Plesk allows to change this for the
machine which works fine, but how do I do it manually when no plesk is
available?

Dynamically Changing Website Look And Feel
I have a website in asp and wants to keep it in asp. All the pages have header and footer used as includes. This is what I want to achieve.

1. dynamically display different header and footer according to the url used.

2. contact us information and enquiry form email address gets forwarded to us as well to another selected email address

3. company name dynamically replaced through out the site probably by using a global variable.

Changing Drop Down Boxes Without Refreshing
I have two drop down boxes that are linked via an ID and a parent_id.

I would like to choose my first option and then have the second drop down box load everything that is under that ID without refreshing the page.

Changing Server Side Variable
how I could change the value of a server variable when the user clicks a button. The asp page displays a report using server side vbscript, and I have added an 'export' button that will copy the report to a file. I need this button to change a boolean so that the page will re-run, writing the report to the file instead of the screen.


Copyright © 2005-08 www.BigResource.com, All rights reserved