I need to open a wav file in a new small sized window while keeping the current page open. However, currently the javascript I pasted in is opening a new page AND a popup small page and playing the wav file in both simultaneously.
This is the javascript in the head section: -
<SCRIPT TYPE="text/javascript">
-
function popup(mylink, windowname)
-
{
-
if (! window.focus)return true;
-
var href;
-
if (typeof(mylink) == 'string')
-
href=mylink;
-
else
-
href=mylink.href;
-
window.open(href, windowname, 'width=400,height=100,scrollbars=yes');
-
return false;
-
}
-
-
</SCRIPT>
-
-
And this is the link:
-
-
<p id="u363-9"><a class="nonblock" href="/audio/2012-04-01.wav" target="_blank" onClick="return popup(this, 'notes')">April 1, 2012</a></p>
-
i would suggest to adapt the link to this: - <a class="nonblock" href="#"
-
onclick="return popup('/audio/2012-04-01.wav',
-
'notes')">April 1, 2012</a>
and the function (for this case) should be: - function popup(mylink, windowname) {
-
window.open(
-
mylink,
-
windowname,
-
'width=400,height=100,scrollbars=yes'
-
);
-
-
return false;
-
}
2 1837 gits 5,390
Expert Mod 4TB
i would suggest to adapt the link to this: - <a class="nonblock" href="#"
-
onclick="return popup('/audio/2012-04-01.wav',
-
'notes')">April 1, 2012</a>
and the function (for this case) should be: - function popup(mylink, windowname) {
-
window.open(
-
mylink,
-
windowname,
-
'width=400,height=100,scrollbars=yes'
-
);
-
-
return false;
-
}
That worked perfectly! Thank you so much!!!
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Ben Smeets |
last post by:
Hi folks,
Have been trying to figure out a solution for the following problem by
reading lots of threads here, but doesn't work out. Hope someone can
help me.
I have a parent window which...
|
by: Ed Brandmark |
last post by:
I want to be able to open a window in the background of my page -
without that flicker you see if you just open the window and then blur
it (or focus the main window).
The reason I want to do this...
|
by: |
last post by:
I'm using this code to export the crystal report file into pdf format and
stream the file to the browser:
ReportDocument oRpt = new ReportDocument();
oRpt.Load(MapPath("MyReport.rpt"));...
|
by: ACaunter |
last post by:
Hi all,
I need to set a session variable and open a new window with a single click
of an asp.net button. My problem is that it always takes two clicks.. one
sets the session and the other opens...
|
by: slacker |
last post by:
In my jsp I have:
<Script langauge="Javascript">
window.location.replace("first url");
window.close();
window.open("second url");
</Script>
The child window opens from the parent window...
|
by: sathyanrockie |
last post by:
Plase tell me what is the difference between window.open and
window.showmodelessdialog.
Can we use window.showmodelessdialog in place of window.open?
|
by: Sonnich |
last post by:
Hi!
I have used JS, but I am still new to it.
I have something like this:
oNewWindow = new Object();
oNewWindow = open("sonnich.xls","Qopen","resizable=yes,scroll=yes,
status=yes,...
|
by: Sonnich |
last post by:
Hi!
I have a asp file, which opens a document into excel (
Response.ContentType = "application/vnd.ms-excel")
The point is, that it creates my excel document well, but I need:
1) to open...
|
by: Cindy H |
last post by:
Hi
I have a webpage with a link to a pdf file on it.
Right now the user has to click on the pdf file link to open and display the
file.
Does anyone know how I can get the web page to just open...
|
by: fatima.issawi |
last post by:
Hello,
I would like to open a pdf file in a new window from my code behind
page.
The code I have currently doesn't seem to work:
Response.Write("<script language='javascript'{...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |