Open Link In Same Page From PHP File?
Feb 6, 2009I 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?
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?
I'm trying to finish off this website, but I need to add a script that allows me to click on a link and information is displayed next to it. There are about 20 links. This is our company website and this is what I want to re-create [URL] so when you click on a link, info comes up for what ever you click.
View 8 Replies View RelatedNot sure if this relates more to PHP or Javascript/jQuery, but is there a way to attach a file to an email client (i.e Outlook), when user click on a link/button?I have a link that generates a PDF and I want it so that, when someone click on a link, it will open up their email client with the PDF already attached, and subject already fill in.I know, you can use <a href="mailto."but that only opens up the mail client. I also need to attach a file with a subject fill in.
View 5 Replies View RelatedHow can I let link page open using IE? For example, I open a webpage using firefox or chrome/opera/safari. When I click the link, open the link using IE
<html xmlns="[URL]">
<head id="Head2" runat="server">
</head><body>
<a href="#" onClick="window.showModalDialog
('[URL]','','width=600,height=600','screenx=200','screeny=200')"><img src="images/benemanc-01th.jpg" alt="img-01" width="125" height="155" class="thumb" style="display:inline"></a>
</body></html>
Having a bit of trouble with this. I'm not a JQuery novice, but can't seem to understand why the Triggerhandler isn't working for this particular PHP site I'm working on. I've used the same type of code in a Drupal site successfully.
I can't seem to find a plugin that can help with either.
In my .js file i am having one variable image2.
Here as there is no link specified it will open a blank page. guys can u please tell me how can i write a condition so that if my href is blank then it will not open any page. the click should not work or else it should load the same page.
Basically I want some of the links in my page to open in new tabs (I'm
using Firefox) or windows if the user has their options configured
that way. And I want my page to remain intact as it involves some AJAX
and takes a while to load.
But ...and this seems to be a big "but"... I don't want the focus to
move away from the page I'm on. So techniques such as <a
target="_blank"or <a onclick="window.open(...)"aren't working for
this requirement. I even tried using a separate function and
attempting to return to the original window straight after using the
following function: Code:
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 View RelatedI 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.
Hi I'm new to the development world and have bumped into a tough problem for myself. I'm attempting to display external RSS feeds on my site using AJAX. The 'title' and 'link' tags from the XML file appear on my page without any problem. However, unlike the 'title' and 'link' tags, some of the 'description' tags contain HTML.[URl].. This seems to be an issue when I'm trying to display the content within the description tags.
Code:
function getXMLHTTPRequest() {
try {
req = new XMLHttpRequest(); /* e.g. Firefox */
} catch(e) {
[Code]...
As you can see, I embarrassingly tried enclosing the variable newtext2 in CDATA tags to no avail. Since I do not directly have access to this RSS file (other than asking my friend if I can edit it), is there a way for me to display the HTML content within the 'description' tags strictly via JavaScript?
How to make an image map link to another page AND open a specific accordion section?I guess I need a script that knows which area of the image map was clicked and not only navigate to page 2 but opens the section via slide toggle I need it too.Here is the the page with the image map (although image map version not upload yet so I have what will be uploaded below)[URL] ...and the page I need to navigate to based on the area of the image map clicked and also slidetoggling the div I need it [URL] Here is the image map:
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<img src="/Img/Illustrations/kicktalkv2.jpg"" alt="Kick Talk" usemap="#kicktalk_map" />
[code]....
This is a weird one. I am new to jQuery so have been following a tute online. My script works, its just takes ages to load - up to a minute! Things were working fine before when the script was on the same page as the HTML but when I put it on its own file it just slows right down. All these files are just operating straight from my local.All I am doing is changing the color of a list (ul) with jQuery on an external .js file.This is the only code on that .js file (called script.js)
$(function () {
$('#list1 li').addClass('alert');
});
[code]....
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...
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]...
Is it possible to use via DOM IE's
File Menu --> Send --> Page by E-mail and Link by E-mail
feature through client side javascripting?
I have a folder "A" with 10 files, all with .txt extensions in it. I want a java script to open all the 10 files in the folder "A" and change the extensions to .js and save it in a folder "B".
View 2 Replies View RelatedHow to play sound file like .wav file with javascript and/or DHTML when some one mouseover to a link. I have done this... but it only works in IE while it does not work in other browsers like firefox and chrome.
View 4 Replies View RelatedI have this piece of code which is opening link in new window:
How to change this code so link would open in the same window?
Probably I should change this part: javascript:void window.open
How do I link to a Javascript script like I link to a.css file?
This is the way my code looks, (this does work):
Code:
<script language="JavaScript">function showObj(objid)
{
parent.frames['there'].document.getElementById(objid).style.display='block'
parent.frames['there'].document.getElementById(objid).style.zindex=Ƌ'
}</script>
</head>
<body onload="showObj('Pg'+parent.document.forms['chapage'].elements['pge'].value);">
I have never been able to get my Javascript into a .js file and still have it work.
i'm running a slideshow and the first image is a link, but when i click on it, it opens the page in another tab.i want it to use the same window i'm already in and open the link there.
var mygallery=new fadeSlideShow({
wrapperid: "fadeshow1",
dimensions: [930, 68],
[code]....
How to open a link on the same window using window.open or any other method in JavaScript.
View 2 Replies View RelatedAt my job we have computers that are set up with restricted rights. Firefox 2 is the default browser (good call), but for some reason a site that the user has to visit is IE only (yeah, wtf).
We have a webpage open with a link to that IE only site, now is there a way to open that link in IE from FF? We have full control over these machines, so we could install batch software or whatever it would take.
I have this piece of code which is opening link in new window:
How to change this code so link would open in the same window?
Probably I should change this part: javascript:void window.open
I want to make one link and If I click twice him (how to open in desktop my computer or my documents) do something and if i click him once do other something
View 2 Replies View RelatedI don't know anything about JavaScript but I found a really cool snippet I use a lot. It will randomize images and each image can open a new link. It looks like this [code]...
Now, my question is, can I link to open a document within an iFrame on my page?
Please don't tell me not to use iframes or whatever, I'm not a professional, just want to see if this works.
the idea below is based on the Sitepoint's article about New-Window Links in a Standards-Compliant World
The idea is not to use the rel attribute but rather check if the domain is different from the one to which the page belongs. Code: