The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> How to make a script code for html, I want to make a little script which can get a little date from user a
amir123
post Dec 26 2011, 12:05 AM
Post #1





Group: Members
Posts: 7
Joined: 25-December 11
Member No.: 16,141



Actually i am trying to make a little script for html which can do a little work. like this


IPB Image

when some one insert text into text box then click one Btn one . After a five second Btn two will appears and having a hyperlink of text which i inserted in text box.

what i do.

i just insert a text box in Dreamweaver and two buttons make a little code it works but not make a button two which has a hyperlink of the text which i write in text box.

please help me out .




thanks in advance
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Dec 26 2011, 02:56 AM
Post #2


WDG Member
********

Group: Root Admin
Posts: 8,017
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



This is about JavaScript, not markup, so I'm moving it to the client-side scripting forum.


--------------------
Darin McGrew
WDG Member since 1998
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Dec 26 2011, 03:57 AM
Post #3


Jocular coder
********

Group: Members
Posts: 2,234
Joined: 31-August 06
Member No.: 43



QUOTE
After a five second Btn two will appears and having a hyperlink of text which i inserted in text box.


Can you explain what this means? Perhaps if the person types 'google', button B then links to http://google.com... something like that?



--------------------
Brian Chandler
Nothing in this post constitutes "commercial solicitation". PayPal does not solicit residents of Japan. Contents may settle in transit. "Legal mind" may or may not be brain-damaged.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
amir123
post Dec 27 2011, 05:37 AM
Post #4





Group: Members
Posts: 7
Joined: 25-December 11
Member No.: 16,141



yes same .......but if i enter other website page it will open it as same like www.google.com/mypage%20xyz ...it will open it as same..


pls tell me what i do
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Dec 27 2011, 08:41 AM
Post #5


Jocular coder
********

Group: Members
Posts: 2,234
Joined: 31-August 06
Member No.: 43



First of all you have to make explicit the relationship between what is typed and the address you go to. I can't understand your explanation above.

If the user types X, this goes to http://...<what>... ???


--------------------
Brian Chandler
Nothing in this post constitutes "commercial solicitation". PayPal does not solicit residents of Japan. Contents may settle in transit. "Legal mind" may or may not be brain-damaged.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
amir123
post Dec 28 2011, 02:37 AM
Post #6





Group: Members
Posts: 7
Joined: 25-December 11
Member No.: 16,141



simple open <x.com>......... if some one insert some website url then it open as same which inserted in text.....some example here,

if i put only words like xyzkdfid then it open <xyzkdfid.com>


( just insert the .com word in front of word which is not recognize that this is website or any simple word )

if i put www.google.com it open same as <www.google.com>

if i put http://google.com it open same as <http://google.com>

This post has been edited by amir123: Dec 28 2011, 02:38 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
amir123
post Dec 30 2011, 12:13 AM
Post #7





Group: Members
Posts: 7
Joined: 25-December 11
Member No.: 16,141



please can u tell me what i do ???????????
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Dec 30 2011, 09:21 AM
Post #8


Jocular coder
********

Group: Members
Posts: 2,234
Joined: 31-August 06
Member No.: 43



This is so supremely pointless it's hard to have much enthusiasm (after all, the user can simply type the address in the address bar -- which will be *at least* 5 seconds faster!)

But you can write a javascript program:

Use onclick() event of first button to set a timer for 5 seconds (what for????)

(Can't remember details: look up the javascript stuff on timeout?() )

This calls a function to save the calculated address (calcultating this will be fairly hard, actually), and switch on display of the second button.

Use onclick() even of second button to do a location thingy.

Do you know any javascript? If so, off you go; you can always ask specific questions if you get stuck.

If you don't, well you *might* find a script somewhere that does exactly this, though I doubt it. Otherwise you have to pay someone to write it for you.

Hope this helps.


--------------------
Brian Chandler
Nothing in this post constitutes "commercial solicitation". PayPal does not solicit residents of Japan. Contents may settle in transit. "Legal mind" may or may not be brain-damaged.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
amir123
post Jan 2 2012, 05:05 AM
Post #9





Group: Members
Posts: 7
Joined: 25-December 11
Member No.: 16,141



Thanks buddy--
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 22nd October 2014 - 01:18 AM