I have called a table through XML with four fields. One of them is Excel file name. I like to make a clickable link with Excel file name to open it.
XML code:
I am working on a website that uses a random header. I have been trying to figure out how to adjust the code so that the header also serves as a clickable link.
Here is the code that I have:
What do I need to add in order for the header to also serve as a link? I am completely new to JavaScript and I don't understand it very well.
I have some Javascript that is selecting text from a form textarea and copying it to the clipboard: document.myForm.myTextarea.focus(); document.myForm.myTextarea.select(); document.execCommand( 'Copy' );
This works great. However there is a problem when I try to paste the text somewhere else. Assuming that the text that is being copied is a [URL], I would like it to be pasted as a link. When I grab a URL from the address bar inside a web browser and paste it somewhere ( such as an e-mail ), it automatically shows up as a clickable link. When I put a URL into my form textarea and run the javascript, it gets pasted as a plain text ( ie. not underlined and not clickable ).
Why are these two different? I've tried running a program to see what is actually copied into the clipboard and I don't see any differences. There must be something that denotes the URL copied from the address bar as a link and therefore makes it clickable when pasted. Is there a way to force this in order to make what is copied to the clipboard from my form textarea a clickable link?
I am trying to make a clickable link in JS wheres as 2 variable assigned as Image URL and Link URL. I have changed the address per forum rules, but I assure you they are valid images addresses and link addresses var _IMAGE_URL = "fakeaddress/picture.jpg"; var _LINK_URL = "fakeaddress"; var _BANNER = "<center><a href="" + _LINK_URL + ""><img src="" + _IMAGE_URL + ""></a></center>" var _POST_THIS = _BANNER
This is then called upon later through _POST_THIS, into a text box, buts its not working. However if I change this: var _BANNER = "TEST<SP>" + _LINK_URL + "<SP>TEST<SP>2<SP>" + _IMAGE_URL + "<SP>TEST<SP>3" Everything posts fine, but ofcourse just as text addresses, such as TEST fakeaddress TEST 2 fakeaddress/picture.jpg TEST 3
So my problem is in this line, trying to post as a clickable picutre, var _BANNER = "<center><a href="" + _LINK_URL + ""><img src="" + _IMAGE_URL + ""></a></center>" Kept hammering away, and the correct statement would be this var _BANNER = "<center><a<SP>href="" + _LINK_URL + ""><img<SP>src="" + _IMAGE_URL + ""></a></center>"
Any way to select a portion of text and convert it to a clickable link? I have seen examples, where the selected text is wrapped in <a> tags, however, I have yet to see an example of having the link actually be clickable. The other issue appears to be with the document.selection property that Firefox seems to not support. So a cross-browser solution would be ideal. I intend to use this with a custom toolbar/button in FCKEditor. The toolbar is in place, we just need to resolve the selected text - clickable link issue.
I have files on the server: .txt, .xml, .config, and "no extension" - all editable with notepad.
User will write some input, it will be added to file in specific place.
I need an ability to change element value in file (in one of them - depends what user choose) (or it even can be some trigger word it-self like CHANGE_ME for not to use attributes)
Create a temporary copy of edited file and create a unique temporary link to it.
I don't know what to start from.... For now I know how to make XHR, but what to do with other extensions?
Have no idea how to save the NEW file (a copy of original file) on server , and create a UNIQUE link ,and delete the file right after it was downloaded.
I can find a specific word in xml file, but how to change it?[code]...
I must begin to say that I'm rather new in wtiting and using JavaScript. Now I want to use JavaScript in a HTML-page. On the homepage is a link. Every time the homepage is displayed the link must point to another target. I want to realize this by having a lot of differet targetpages. The names of these pages are p1001.htm until p<nnnn>.htm. At this moment the last is p1153.htm, but the amount is increasing every day.
I have a file named "counter.txt" which contains one line with the string of the last targetpage, at his moment "1153".
My idea is to have a JavaScript which: 1. reads the file counter.txt to determine the last available page 2. then takes at random one number between 1001 and 1153, 3. sets the HREF-link to page p<random>.htm.
I know it must be possible in JavaScript, but can anyone help me?
then pass it directly to window.open? In particular, I can pass the modnodeform.php?=5 to window.open but, I need to set the "class" attribute to then pass the window.open function.
i created one blog . In that i put other site links . When users clicked that link it opened in the same tab . i need html codings to open in another tab if users click that link .
I'm trying to understand how to work the dom, and all I'm trying to do is insert a link right before another link in the html based on it's href value. This isn't a real world example - I'm just trying to do this in phases to understand what's going on. I'm getting an error (Object doesn't support this property or method) in IE and I can't figure out what I'm doing wrong. Code:
is it possible to create a link in an email that will go to a site and run its javascript. If so how?what I trying to do is email an alert to selected users when a flash ad is ready. The email will have a link that, when clicked, goes to the home page and displays the ad. the code above takes them to the web site but doesn't run the javascript.
Basically, I am trying to create a drop down menu that, when a link is chosen, instead of leading to an external page will make information appear underneath... is this possible, and if so, how?
I currently have an alert message box appearing which asked the user to visit a website to take a survey. What I would ideally like is a message box appearing which gives them two options in the form of buttons. Yes to take the survey now, which would link to the web page. The second button being cancel which would close the message box, which is normally done with the OK button now.
I have a sample page with three tabs (tabs.html). Tabs are displayed as follows: <ul class="tabs"> <li><a href="javascript:tabSwitch('tab_1', 'content_1');" id="tab_1" class="active">Tab 1</a></li> <li><a href="javascript:tabSwitch('tab_2', 'content_2');" id="tab_2">Tab 2</a></li> <li><a href="javascript:tabSwitch('tab_3', 'content_3');" id="tab_3">Tab 3</a></li> </ul>
The JavaScript used to switch tabs is: function tabSwitch(active, number, tab_prefix, content_prefix) { for (var i = 1; i < number+1; i++) { document.getElementById(content_prefix+i).style.display = 'none'; document.getElementById(tab_prefix+i).className = ''; } document.getElementById(content_prefix+active).style.display = 'block'; document.getElementById(tab_prefix+active).className = 'selected'; } Now, by default, when I link to tabs.html, the first tab is set to active. Is it possible to create a link from another site that links to tabs.html and forces the second or third tab to be active?
First, I did this for testing <script type="text/javascript"> <!-- var cururl = window.location.href + "?style=1" document.write(cururl); //--> </script>
and it works. It gets the current url of the page and appends ?style=1 then writes out the URL. However getting it as a clickable link is what's stumping me. <script type="text/javascript"><!--function goURL() { window.location.href + "?style=1" } //--> </script> <a href="javascript:goURL()">Go There</a>
Doesn't work in my test. As you can probably see, I'm not very well versed in javascript.
Does anyone know how to create a link (<a> . . . </a>) with some piece of javascript code that has the onClick event set for some function that I also wrote (not a build-in function).
I can find all sorts of samples in these disc.groups but none of them seems to work for me.
I am focussed on Firefox, but some code that also works for IE, would be appreciated.
BTW I know how to create elements in the html document, that is not the problem. The problem is that I seem not te be able to set the onClick event for some created element. I tried for both a link and also for a text-element. I can set the onClick for some built-in function like alert('Nice Day').
There are loads of examples to be found for that, and they indeed work.
i am trying to create a method in which if i press a arrow key (up) then my any link (lets say it home link) from my main navigation is automatically clicked! and i m redirected to home page.
I would like to create a link from one page to another. Easy - I know. But I would like that link to to take me to a certain part of the other page, specifically towards the bottom of the page.
Is that possible to do? And if so, what are the different ways I can specify where in the page to go? (i.e. what are the parameters that I can play with)
I have created a slideshow before but I want to create a slideshow where a person clicks on a link and it goes to a certain picture which might have one or more links embedded into the picture something like this:
I have a form with several pull-down menus. I want to give the user the option of learning more about the choice they have made in a pull-down menu.
I'd like to create a text link that takes you to a page with the parameter which is the index number of the pull-down menu. I'd also like it to open in a new window.
How do get that value as a parameter to use in a link?
I am very new to javascript, but I am trying to create a function that will get all the form values on the page and then create a link to a .php page with the form values passed using GET method. Basically its an update form to update a company's server information, which will then send the new and/or existing values to a .php page to update the DB. It seems as though after executing the IF statement, it breaks the for loop.
HTML Code: <script type="text/javascript"> function GetFormValues() { var elem = document.getElementById('server_form').elements; theLink = '<a href="update_server_health.php?'; for(var i = 0; i < elem.length; i++) { .....
I use javascript to create a cookie when you click a link <a href="#" onclick="document.cookie='settings=blue; expires=31/03/2009;'">Blue</a> This creates a cookie and I can get it back easily but I want to use it as settings. I have 3 folders of pictures white blue and pink the user will click the link selecting there colour creating a cookie. Now when the page finds the cookie it needs to place the output in to the path. <img src="pictures/ !!!output!!! /something.png">
So far I have this (just a trial) <script type="text/javascript" src="cookie.js"> </script> <script type="text/javascript"> function image(){ settings=getCookie('settings'); if (settings!=null && settings!=""){ document.write('<img src="'+settings+'.png">') }}document.write(image()) </script>
This works but next to the image it says undefined so how would I get rid of it?
I'm using this script: [URL] I would like to know how to make the script open with another �Click Here to Contact Us text (not the same button) hyperlink somewhere further down on my page. For example: