Help - Search - Members - Calendar
Full Version: Popup window not enabled in child tab when it's hyperlinked
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
ari1990
I have a query . I have built a HTML page which has hyperlinks to say page-A.
Page-A has something like if i click some entities in that page-A then there is a popup-window,
but when the page-A is itself hyperlinked i'm unable to see the popup functionality in the page-A.
Page-A supports popup if opened using normal entry of URL in the address bar.
please help
Christian J
Impossible to say without seeing the pages (or at least a code example).

pandy
QUOTE
but when the page-A is itself hyperlinked i'm unable to see the popup functionality in the page-A


The popup doesn't work when you click the link/button/whatever or you can't see the entity that should be clicked? And yeah, we need to see.
ari1990
Those URLs are my weblogic server links .
I created those to ease my access.

In those pages if i click instances they open in a new child window. [normal case]
but If i open the server page through the hyperlinks its not as expected.
..
Though i cant provide the actual URLs :
I 'm pasting the sample code:

<!DOCTYPE html>
<html>
<title>W3.CSS</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://www.w3schools.com/lib/w3.css">
<body>

<div class="w3-container">
<center>
<h2>AIA ENVIRONMENTS</h2>
<h2>THE ULTIMATE MIDDLEWARE</h2>
</center>
</div>

<ul class="w3-navb script:void(0)" onclick="openENV('DEV')">Dev Environments</a></li>
<li><a href="java script:void(0)" onclick="openENV('ST')">ST Environments</a></li>
<li><a href="java script:void(0)" onclick="openENV('Higher')">Other Higher Environments</a></li>
<li><a href="java script:void(0)" onclick="openENV('MISC')">Other useful URLs</a></li>
</ul>

<div id="DEV" class="w3-container ENV">
<h2>DEV</h2>
<p>List of all BU environments.</p>

<table style="width:100%" BORDER="5">
<tr>
<th>NAME</th>
<th>EM CONSOLE</th>

<th>USERNAME</th>
<th>PASSWORD</th>
</tr>
<tr>
<td>NEW BU</td>
<td><a href="http://host:7001/em" target="Ari"/>Host</td>

<td>weblogic</td>
<td>weblogic123</td>
</tr>


</table>


</div>

<script>
function openENV(ENV) {
var i;
var x = document.getElementsByClassName("ENV");
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
document.getElementById(ENV).style.display = "block";
}
</script>



</body>

<style>
div{
animation-name: BGCOLOR;
animation-duration: 10s;
}

@keyframes BGCOLOR{
from {background-color: red;}
to {background-color: yellow;}
}
</style>


</html>
Christian J
QUOTE(ari1990 @ Feb 10 2017, 03:31 PM) *

Those URLs are my weblogic server links .
I created those to ease my access.

Didn't understand the above. unsure.gif

The javascript looks like a toggle script (which has nothing to do with popups), but it needs HTML sections in order to work (each section with the CLASS "ENV" and an ID corresponding with an entry in the menu).

QUOTE
CODE
<ul class="w3-navb script:void(0)" onclick="openENV('DEV')">Dev Environments</a></li>

The above HTML is invalid --the UL end tag and LI start tag are missing.

QUOTE
CODE
<li><a href="java script:void(0)" onclick="openENV('ST')">ST Environments</a></li>

You don't really need the actual links or "javascript void" parts, use the onclick event on the LI instead.
pandy
QUOTE(Christian J @ Feb 10 2017, 03:59 PM) *

QUOTE
CODE
<ul class="w3-navb script:void(0)" onclick="openENV('DEV')">Dev Environments</a></li>

The above HTML is invalid --the UL end tag and LI start tag are missing.


And I don't think a class named "w3-navb script:void(0)" works that well either. The style block you have between </body> and </html> should be someplace else. Can't have anything there.

QUOTE
The javascript looks like a toggle script (which has nothing to do with popups), but it needs HTML sections in order to work (each section with the CLASS "ENV" and an ID corresponding with an entry in the menu).


Yeah, there's one single link on the page, this one.
CODE
<a href="http://host:7001/em" target="Ari"/>Host

Apart from being broken (missing closing tag) there's nothing that would make it open in a new window.

Guess we don't understand. But the HTML is very messy, maybe that's the reason for the problem you see too.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.