Linking Template Page To Open A File In Another Window?
Sep 16, 2011
I am building a static website, and I have images in my index page each image has a title name, how do I make an image clicked to open in a different window if clicked, I have a template page designed to be used for opening an image in a different window if clicked but I don`t know how to configure everything. Secondly, I would want the image to be placed in a particular section in the template page.
View 2 Replies
ADVERTISEMENT
Feb 16, 2011
Basically, I have a link that should open the targeted link in a blank page, and upon the link being clicked, the original page's URL should be changed. The reason for this is that the user has to browse information on another website, and then pass the information on to me via a contact form, so rather than make them click back on my tab in the browser, and then find the "Contact" page link to fill in the form, I thought it would a good feature to simply go ahead and load the "Contact" page upon them clicking the link to the external page (which of course loads in a new tab). Here is the code I have in place:
Code JavaScript:
<a href="http://www.othersite.com/" target="_blank" onclick="window.location.href='http://www.mysite.com/contactus.php';">Other Site</a>
This all works fine on my computer, regardless of the browser that I use. One of my partners on this project called me this morning and said that the link was taking him directly to the "Contact" page without opening the "Other Site." This is strange because after I put this in place, I showed it to him and it worked fine. Now, a few days later, and it does not work. He said that he cleared his browser cache, history, cookies, etc. and the problem did not go away. He uses IE8. After he told me it was no longer working, I went to test it myself, and it works fine for me no matter which browser I use (IE8 or 9, Firefox 3 or 4 Beta).
why this might have worked one day and not the next? Is it simply a problem on his computer, or could it be an issue where based on what type of browser you are using, this won't work. Also, I know this is the JavaScript forum, but is there a way to do this in PHP without using the JavaScript onclick event? Obviously, I can't use the header() function since this functionality needs to be present on a link within text of a page.
View 2 Replies
View Related
Apr 2, 2008
my file is located at c:AdminFiles.xml
i tried the following ways
window.open("c:/AdminFiles.xml",'HeavyXml');
window.open("c:AdminFiles.xml",'HeavyXml');
window.open("c:\AdminFiles.xml",'HeavyXml');
in the above i'm getting the following error: "Firefox doesn't know how to open this address, because the protocol (c) isnt associated with any program"
window.open("file:///c:\AdminFiles.xml",'HeavyXml');
the last attempt give to respond at all...
View 5 Replies
View Related
Jul 23, 2005
how I can set up a script that would open a pdf file when a button is clicked?
Can I add a "Close" and "Print" buttons to the file being displayed?
View 2 Replies
View Related
Jul 23, 2005
I have a window open, let's say index.html. On the page I have a link that executes a javascript. I want the javascript to open file new.html in the same window that index.html was displayed in. How do I do this? Everything I try opens a new window.
View 2 Replies
View Related
Jul 23, 2005
I'm trying to link to some PDF files from an HTML page that will be
used for a presentation. The user wants to have the windows open up in
Adobe Reader 7.0 at maximum size (not full screen).
I'd rather a more reliable system than simply resixing the window
before hand because I won't always be able to do that before the
presentations.
I can make changes to the Adobe Reader configuration or registry (if
needed) to make the program always open in full screen. but I would
prefer it if I can control the behavior from the HTML link itself.
View 1 Replies
View Related
Jul 27, 2011
I have been working on this and cant figure it out.I have an index.html as my main file and I wanted to have a pop-up window that will also open together with the index file. the pop-up window is a notepad like type, file name is clipboard.html.Addon: i started adding code to have the pop-up to stay on the right side of the screen and always on top.
View 3 Replies
View Related
Mar 23, 2011
How do you open a local html file in the parent window (asp.net)?
View 1 Replies
View Related
Oct 4, 2010
I am working on a project in which I have to open my flash demo in a modal window. I got all the code for modal window and it is working great.The only problem is I am not able to open a flash file in modal window.
View 2 Replies
View Related
Feb 1, 2011
I'd like to open using JS an outlook send mail window having a file from the server (full url, that should work, right ?) attached. Is this possible ?
View 2 Replies
View Related
Apr 27, 2010
I have an <input type="file"> field and I would like the file chooser dialog to open automatically after the page loads, for example on onload(). I have found a trick with executing click() in js on the file element but it seems to only work in IE. Are there any methods that would work in FF and other browsers as well?
View 1 Replies
View Related
Feb 1, 2011
I'd like to open using JS an outlook send mail window having a file from the server (full url, that should work, right ?) attached.
View 1 Replies
View Related
Jul 20, 2005
I have an html page that uses javascript to open a new window and
display a file that gets created when a button is pressed.
My problem is when the file is changed and the display button is
pressed, the old file is still displaying. I have tried using
<META HTTP-EQUIV=expires CONTENT=0><META HTTP-EQUIV=PRAGMA CONTENT=NO-CACHE>, but doesn't work 100% of the time.
View 1 Replies
View Related
Feb 6, 2009
I am trying to open a link in a same window (from a php file).
onclick="window.open('".$url."')"
This opens in a new window, but how can I change it so it opens in the same window?
View 4 Replies
View Related
Dec 1, 2010
I need to be able to search through an xml located on my local machine with an html page. Here's the thing: this whole system (html files, xml file) will always be on my local machine. Because it's a class project it won't be on a server. So here's the scenario: I navigate to where my files are located (say C:) and I double click my index.html page and this page opens in my browser and from this page I need to be able to search my xml file which is at the same location. I've tried xmlhttprequest and it won't open the xml file I'm guessing because I don't need an http request.
Here's what I have so far:
if (window.XMLHttpRequest) {
xmlhttp=new XMLHttpRequest();
} else {
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
} xmlhttp.open("GET","C:MovieDB.xml",false);
xmlhttp.send(); xmlDoc=xmlhttp.responseXML;
function searchDB() {
if(!xmlDoc){
alert("error")
} var keyword = $('#txtBox').val();
var searchVal = $('#basicCategory :selected').text();
var allitems = xmlDoc.getElementsByTagName("Movie");
for(var i=0;i<allitems.length;i++){
alert(allitems[i].getElementsByTagName(searchVal[0].
childNodes[0].nodeValue);
} }
The code doesn't make it past the xmlhttp.send() line.
View 1 Replies
View Related
Aug 8, 2011
I am working on building a site so people can get the latest reports. I am working with the existing folder architecture. Here is how the folders look.
SalesRev >
old (this is a folder inside SalesRev) salesPDF_80811.pdf (This is today's file that is in the same folder as old) I will not be able to link to the full file name sense the date will change each day. Is there anyway to link to the beginning of the file name
View 5 Replies
View Related
Mar 16, 2011
relatively new coder here definitely new to js and I can't figure out how to get this script linked into an external file every time I try nothing shows up.
<html>
<head>
<script language="JavaScript1.1">
<!--
var slideimages=new Array()
var slidelinks=new Array()
[Code]...
do i need to break this up into 2 files or something I can't get it to work
View 2 Replies
View Related
Nov 15, 2011
I think that the way I have worded the title may be incorrect, as I've googled similar phrases without finding anything to help me Anyway onto the issue
I have a dropdown menu
you can see it here:
http://heavywoollen.webs.com
It's written in html & css, now I've had to put the code for the dropdown onto every page of the site, simply because at the time that was all i knew how to do, so I'm now trying to reduce it by writing it on JS and link the file into the page so the issue/question
[Code]...
View 3 Replies
View Related
Jun 18, 2007
I have an existing javascript menu where the user selects a meaning from a drop down box and a list of products with that meaning appear in a search results page.
I had the whole javascript pasted into one of the columns where I wanted the 'search by meaning' box to appear and it worked fine, however when I tried to validate the HTML (4.01 strict) it popped up errors left and right because it was interpreting the script as HTML.
I don't know how to write js or work arounds, so I removed the whole script from the page and saved it in a .js file, but I am doing something wrong because I cannot get the javascript to appear at all, nevermind getting it to appear in the column I want it to. Code:
View 4 Replies
View Related
Jul 20, 2005
I open a link in a new window:
<a href="http://www.somewhere.com/some.hml"
onclick="window.open(url,null,'resizable=yes,toolbar=no,loc ation=no,directories=no,status=no,menubar=no,scrol lbars=yes,width=600,height=400');">Link</a>
The page I am opening is not mine.
I want to edit the content of the page I am opening, adding text
"This page is opened in a new window" as a first thing after the body
tag of the opened page.
Is it possible to do it with javascript, while opening the page, or
should I use Java?
View 7 Replies
View Related
Jan 25, 2010
I need to open a window without scrollbars, menus, etc. and a specific size. I believe I have found scripts that can do this. But I also need it to open to specific coordinates of the page. i.e, only displaying the center portion of the page (the page is not mine) and not letting the user move to other portions with scroll bars, nor resize the window.I realiize that hitting tab will usually move them around, but I am not worried about that. They won't know where they are and will just reload.I have basic html skills but not scripting, other than copying/pasting other people's code.
View 1 Replies
View Related
Apr 11, 2010
Am making a user registration page and i want it to be smaller then my other pages and it should open in a new window, something like a popup window.
View 2 Replies
View Related
Oct 4, 2005
how I can create a link that goes back 2 steps in the history, but opens this in a new window? I've searched for this but no success so far.
View 4 Replies
View Related
Aug 12, 2009
I had a small problem in my page. There are some select menus that the user can select and there is a download button which on click should allow the user to download a file based on the selected options...I used the following code under the onclick event but the problem is that it allows the user to download the file but the page refreshes itself or in other words all the selections are lost when the download window opens
View 1 Replies
View Related
Jul 20, 2009
I have this javascript to open a new page.Currently it open the page but opens it as a pop up.How can i change to open in the same page.[code]
View 7 Replies
View Related
Jan 6, 2003
Is there a way of checking a file exists before linking to it?
I sell didjeridoos and handdrums.
I was hoping to create small html program for each drum, somthing like this....
<script>
thisdrum=new Image()
thisdrum src=drum001.gif
price=100
rim=12
height=24
</script>
<script src=createpage.js>
</script>
and saved as drum000 to drum999
Now I need a function included in the creatpage.js, that checks if a file exists,(eg drum000.html) if it does, go there, if it doesn't, try drum001.html
any suggestions on how I could go about it?
View 11 Replies
View Related