I am working with framesets for an internet browser-based application that will be running on a local machine. I would like when an image is clicked to target another frame where details will appear. I tried to include "target=details" at the end of the image source as follows but that produced a sytax error:
IMAGE code in gallery.php:
<a href=details.php?c_id=<?php echo $c_id ?> ><img src="./images/<?php echo $row['cfilename'] target=details;?>" width="100" height="100" alt="" />
FRAMESET in index.php:
<FRAMESET ROWS="17%,*">
<FRAME SRC="titlebar.php" NAME=TITLE SCROLLING=NO>
<FRAMESET COLS="26%,30%,*">
<FRAME SRC="sidebar.php" NAME=sidebar TARGET=gallery>
<FRAME SRC="gallery.php" NAME=gallery>
<FRAME SRC="details.php" NAME=details>
</FRAMESET>
<NOFRAMES>
<H1>Criminal Records Database</H1>
No frames? No Problem! Take a look at our
no-frames version.
</NOFRAMES>
</FRAMESET>
you need to add target="_nameofframe" to the href tag and tell it where to open the new link.
in your case, the href of the gallery images should have the following target="details"
i.e.
<a href=details.php?c_id=<?php echo $c_id ?> ><img src="./images/<?php echo $row['cfilename'];?>" target="details" width="100" height="100" alt="" />
Related
I came across this APIserver to generate the QRCode but I was wondering is it possible to just use HTML to generate the QRcode for example this is what I was thinking
<input id="text" type="text" value="Please Enter Your NRIC or Work Permit" style="Width:20%"/>
<img src="https://api.qrserver.com/v1/create-qr-code/?data=HelloWorld&size=100x100" alt="" title="HELLO" />
In the "title" I believe it is where you will write your text and the QR code would generate, I was wondering how can I create a text box for me to key in the value directly on a website.
Were you thinking of something like this? https://jsfiddle.net/v7d6d1ps/
Your HTML can be similar to what you have but with added onblur event. Only HTML cannot do this, so I have added jQuery/JavaScript combination.
<html>
<head>
<title>Testing QR code</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script type="text/javascript">
function generateBarCode()
{
var nric = $('#text').val();
var url = 'https://api.qrserver.com/v1/create-qr-code/?data=' + nric + '&size=50x50';
$('#barcode').attr('src', url);
}
</script>
</head>
<body>
<input id="text" type="text"
value="NRIC or Work Permit" style="Width:20%"
onblur='generateBarCode();' />
<img id='barcode'
src="https://api.qrserver.com/v1/create-qr-code/?data=HelloWorld&size=100x100"
alt=""
title="HELLO"
width="50"
height="50" />
</body>
</html>
Copy and paste this into an HTML file on your desktop. Type in the text box 12345 and hit tab. Notice that the QR code will update.
I'm working on a asp.net project in Visual Studio 2012. This site is contains of download section and picture galleries. I'm using such code to show pictures added into a gallery.
string tag = "<img src=\"{0}\" width=\"64\" height=\"64\" /><br />";
addedPics.InnerHtml += string.Format(
tag, Request.Url.Authority + "/admin/pictures/" + fileName);
which results in tag like below
<img src="localhost:49179/admin/pictures/sandbox_01_ME.jpg" width="64" height="64" />
before this I used code like below in a Asp:Repeater:
<img src="<%# Request.Url.Authority + "/admin/Pictures/" + Eval("Filename") %>"
style="float: left" width="64" height="64" />
but neither of them is working.
Any help would be appreciated.
Use a relative links in the images.
<img src="/admin/pictures/sandbox_01_ME.jpg" width="64" height="64" />
Code should be like this:
<img src="<%# "/admin/Pictures/" + Eval("Filename") %>"
style="float: left" width="64" height="64" />
When you run locally, you will have trouble trying to build the absolute URL.
I want to navigate to my added jsp page from casGenericSuccess.jsp but I am not able to transit to next page using hyperlink.
What i did is:
changes in login-webflow.xml
<view-state id="viewGenericLoginSuccess" view="casLoginGenericSuccessView">
<transition on="userManagement" to="userManagementHome" />
</view-state>
default_views.properties
userManagementHome.(class)=org.springframework.web.servlet.view.JstlView
userManagementHome.url=/WEB-INF/view/jsp/default/ui/userManagementHome.jsp
casGenericSuccessView.jsp
<jsp:directive.include file="includes/top.jsp" />
<div id="msg" class="success">
<spring:message code="screen.success.header" />
<p><spring:message code="screen.success.success" /></p>
<p><spring:message code="screen.success.security" /></p>
<a href="login?_flowExecutionKey=${flowExecutionKey}&_eventId=userManagement">User Management
</div>
<jsp:directive.include file="includes/bottom.jsp" />
Also I tried changing href to login?&_eventId=userManagement
I have my userManagementHome.jsp at same place where casGenericSuccess.jsp is present.
can someone please help me out navigate to my page.
Right now it is not navigating and displays the same casGenericSuccess.jsp page on click of user management link.
Try with execution instead of _flowExecutionKey
Is there a way to display the video in a website page as an arranges icons of videos or thumbnails, so whenever I click on one video it should open a new window to play that video? not play it in the same page.
as this code, but the target="_blank" not leading me to another page?
<a href="video1.aspx" target="_blank">
<object type="video/x-ms-wmv" data="Videos/clock.avi" width="320" height="255" >
<param name="src" value="Videos/clock.avi">
<param name="autoStart" value="0">
alt : clock.avi
</object>
</a>
When you see that with Youtube or other streaming website, is not VideoObject was open a website with video, is just a link to one page with the same video...
You have lot of method for create this "effect" , for optimize, you want just load One image (for create a thumbnails) of your video for create the link
<a href="pageofyourvideo.aspx" target="_blank">
<img src="yourVideoImage.jpg" title="myVideotitle" />
</a>
because, it's unnecessary to load your video, if it's just for link here in other page...
In your video Page, you can juste play your video...
<div id="myVideoBox">
<object type="video/x-ms-wmv" data="Videos/clock.avi" width="320" height="255" >
<param name="src" value="Videos/clock.avi">
<param name="autoStart" value="0">
</object>
</div>
If you've few competences in your language ( aspx, html ? ) you want to create one same page for all your videos, with a parameter in your link in all thumbnails...
For sample, you can create two thumbnails with the same link, and just parameter change :
sample with php link :
<!-- first Thumbnails link to video1.avi -->
<a href="pageofyourvideo.php?myvideo=video1.avi" target="_blank">
<img src="yourVideoImage.jpg" title="myVideotitle" />
</a>
<!-- second thumbnails link to video2.avi -->
<a href="pageofyourvideo.php?myvideo=video2.avi" target="_blank">
<img src="yourVideoImage2.jpg" title="myVideotitle2" />
</a>
and you received parameters in your video page : (always with php...)
<!-- If parameter "myvideo" was "video2.avi" video2.avi was played... -->
<div id="myVideoBox">
<object type="video/x-ms-wmv" data="Videos/clock.avi" width="320" height="255" >
<param name="src" value="<?php echo $_GET["myvideo"]; ?>">
<param name="autoStart" value="0">
</object>
</div>
I use .php for sample because I'm not familiar with .aspx but you can make this sample in .aspx :-)
I never saw that problem and I have no idea what is causing it.
I got something like this code in my masterpage
<div class="myClass1">
<a href="~/#link" runat="server" title=" <%$ Resources: myRess1 %>">
<asp:Literal runat="server" Text="<%$ Resources: myRess1 %>" /><br />
<img class="myClass2" src="/MasterPage/images/myGif.gif" width="19" height="12" alt="" />
</a>
</div>
when I browse a page that using this master page, the code become
<div class="myClass1">
<a href="#link#link" title="myTitle">
myTitle<br />
<img class="myClass2" src="/MasterPage/images/.gif" width="19" height="12" alt="" /><br />
</a>
</div>
why does the link double itself?
if I put something like default.aspx instead of #link, it work perfectly.
The reason why I'm using "~/" is because the master page is located somewhere else, if I don't put ~/ it make the link as /masterpage/#link which is invalid
The ~/ should not be necessary. Just use #link
'~' can be used only with server controls and not with html controls. You should just use href="#link".
for now I changed my
<a href="~/#link" runat="server" title=" <%$ Resources: myRess1 %>">
to
<a href="#link" title="<%=GetLocalResourceObject("myRess1 ") %>">
and it's working fine but if someone could tell me why with runat="server" screw up the #link, that would be good to know