When an external JavaScript file is referenced,
<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
is the JavaScript source (lines of code before interpretation) available from the DOM or window context in the current HTML page? I mean by using only standard JavaScript without any installed components or tools.
I know tools like Firebug trace into external source but it's installed on the platform and likely has special ability outside the context of the browser sandbox.
I need to generate a composite page made up of other pages in our system.
Is it possible for me to dynamically add iFrames to a page, each with its own src pointing to different URLs which are determined on the fly? If so, is there a preferred method to this?
Otherwise I need to refactor the other pages into user controls so I can add them as needed.
hi, sorry for maybe this is stupid question, I just want download source code form the link as follows: http://argouml.tigris.org/source/browse/argouml/trunk/src/
I try to use the command :
svn checkout http://argouml.tigris.org/source/browse/argouml/trunk/
but it throw error :
svn: OPTIONS of 'http://argouml.tigris.org/source/browse/argouml/trunk': 200 OK (http://argouml.tigris.org)
I am strange that , how to checkout the source code from the url ?
many thanks for your help !
Regards
I have a neat little jQuery script I am working on.
Goal: parent div with overflow hidden holds a larger div with image. When I move the mouse to the left or right of the parent div, the div with image changes margin-left to move left or right. Problem is... if I move the mouse out of the parent div (left or right), the image keeps going. I need the image to stop when the mouse is not on the inside left or right edge of the parent div. Any ideas?
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
//<![CDATA[
jQuery.noConflict ();
jQuery(document).ready(function(){
jQuery('#container').mousemove(function(e){
var parentWidth = jQuery('#container').width();
var parentWidthLeft = Math.round(.1 * jQuery('#container').width());
var parentWidthRight = Math.round(jQuery('#container').width() - parentWidthLeft);
var parentHeight = jQuery('#container').height();
var parentOffset = jQuery('#container').offset();
var X = Math.round(e.pageX - parentOffset.left);
var Y = Math.round(e.pageY - parentOffset.top);
if (X<parentWidthLeft)
{
jQuery('#image').animate({'left': '-' + parentWidth }, 5000);
}
if (X>parentWidthRight)
{
jQuery('#image').animate({'left': parentWidth }, 5000);
}
if (X<=parentWidthRight && X>=parentWidthLeft)
{
jQuery('#image').stop();
}
if (X<1)
{
jQuery('#image').stop();
}
});
jQuery('#container').mouseleave(function(){
jQuery('#image').stop();
});
});
// ]]>
</script>
</head>
<body>
<div id="container" style="width: 500px; height: 500px; overflow: hidden; border: 10px solid #000; position: relative; margin: auto auto;">
<div id="image" style="position: absolute; left: 0; top: 0;"><img src="http://dump4free.com/imgdump/1/Carmen-Electra_1wallpaper1024x768.jpg" alt="" /></div>
</div>
</body>
</html>
Code is not running on .click when I have this:
$(".cancel").click(function() {
alert("got here");
$(this).closest(":dialog").dialog("close");
});
<a class="cancel" href=""><img src="images/cancelButton.gif" border="0" /></a>
It's got to be something stupid, but I cannot see it.
I want to make text animation like this slide in from left. There are three text fields
Sports Cargo Bag
$14
Sale $25
I want these text to be set from jquery and slide in from the left like this link. This is my code JsFiddle
html
<div id="mainContainer">
<div id="logdo">
<img src="http://i.share.pho.to/7346a9ca_o.gif"/>
</div>
<div id="images">
<img id="introImg" src="http://i.share.pho.to/9064dfe4_o.jpeg"/></div>
<div id="headlineText">
<p id="headline1Txt" ></p>
<p id="headline2Txt" ></p>
<p id="headline3Txt" ></p>
</div>
<button class="btn btn-primary" id="ctaBtn" type="button">SHOP NOW</button>
</div>
css
* {
margin:0;
padding:0;
}
#mainContainer{ text-align: center;
width:160px;
height:600px;
box-sizing:border-box;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
border:5px solid #BACAE4;
overflow: hidden;
position: fixed;
}
#images{
position:absolute;
top:200px;
left:3px;
right:1286px;
Width:130px;
height:152px;
}
#introImg{
position:absolute;
top:40px;
left:7px;
right:11px;
}
#headlineText p
{
text-align: center;
position: absolute;
top:60px;
left:-120px;
Width:120px;
height:269px;
line-height:1.0;
overflow:hidden;
}
#ctaBtn{
position:absolute;
top:540px;
left:26px;
right:0px;
Width:106px;
height:28px;
}
Hi all,
I want to know is there any option/work sround for $_SERVER['HTTP_REFERER']. Because 'HTTP_REFERER' can not be trusted.
Then What is other way to know that from which url the request has came from?.
Here is the situation -
http:// abc.com/one.htmlwill have an iframe having src=http:// xyz.com/giv.php?param=1.
How giv.php on xyz.com will know that request is coming from http:// abc.com/one.html?
I can't believe it, but this is really happening. I ran out of available quote symbols using jquery and javascript native functions together. Can somebody help? Maybe there is yet another symbol?
var t=setTimeout('$("#popupChange").html('<img src="http://servername/pdf/picture/genericThrobber.gif" />');',2000);
I dynamically am changing the location and src of an iframe.
Is there an event that will tell me when the page i just put has loaded from javascript?
Basically I want to append something to the page but first need to know that everything is loaded.
hi
CMake Error at src/svnqt/cmakemodules/FindSubversion.cmake:364 (MESSAGE):
No subversion includes found!
I already installed svn.
i got this error while building kdsvn. I googlit but didnt get any solution ..
pls help me
i am using "beassistance validation" for my form and using tooltip plugin and it work fine except that positioning.
please have a look at this link and i upload my form to get an idea what i am talking about.
what i want is:
if my validation fails i want to display the message after the tooltip icon, but its displaying the message before the tooltip icon. please see here
here is the .css i am using:
validation .css
#aspnetForm
{
width: 670px;
}
#aspnetForm label.error
{
margin-left: 10px;
width: auto;
display: inline;
}
form.cmxform
{
width: 50em;
}
em.error
{
background: url("Images/unchecked.gif") no-repeat 0px 0px;
padding-left: 16px;
}
em.success
{
background: url("Images/checked.gif") no-repeat 0px 0px;
padding-left: 16px;
}
form.cmxform label.error
{
margin-left: auto;
width: 250px;
}
#aspnetForm label.error
{
background: url("Images/unchecked.gif") no-repeat 0px 0px;
padding-left: 16px;
padding-bottom: 2px;
font-weight: bold;
color: #EA5200;
}
#aspnetForm label.checked
{
background: url("Images/checked.gif") no-repeat 0px 0px;
}
em.error
{
color: black;
}
#warning
{
display: none;
}
<asp:Label runat="server" ID='Label8' >Start Date:</asp:Label>
<asp:TextBox ID="txtStartDate" runat='server' ></asp:TextBox>
<a style="cursor: hand" class="tooltip" title="Select the starting date of a visit, example 05/05/2010 (MM/DD/YYYY)!">
<img alt="" src="Scripts/JQuery/Tooltip/icon_tooltip.gif" style="width: 11px; height: 11px" /></a>
<p>
</p>
<asp:Label runat="server" ID='Label9' >End Date:</asp:Label>
<asp:TextBox ID="txtEndDate" runat='server' ></asp:TextBox>
<a style="cursor: hand" class="tooltip" title="Select the end date of a visit, example 05/06/2010 (MM/DD/YYYY)!">
<img alt="" src="Scripts/JQuery/Tooltip/icon_tooltip.gif" style="width: 11px; height: 11px" /></a>
tooltip.css
#tooltip{
position:absolute;
border:1px solid #333;
background:#f7f5d1;
padding:2px 5px;
color:#333;
display:none;
}
Hello fellow front-end web h4X0|2s,
I was wondering if anyone had any resources, proof, or personal experience in using the age-old http/https JavaScript hack:
<script src="//someserver.com/js/script.js"></script>
Has anyone encountered issues in any of these browsers (IE 5.5+, FF2+, Chrome, Opera 9+, Safari 3+)? Has anybody had success stories?
Thank you for your help.
Hi All,
I am creating application using jquery in asp.net. I am displaying images(664 x 428) with fade effect using cycle plugin and also a gif file outside the control.
Problem:
The gif file animation is working only if i pause the cycle fade effect the gif file animation is working.
Coding:
$('#mainBanner').cycle({
fx: 'fade',
continuous: true,
speed: 7500,
timeout: 55000,
pause: 1,
sync: 1
});
<img src="Images/HomePageImages/scan.gif" alt="" width="124" border="0" height="124" />
To empty a div and replace it with an image I am using:
$(this).html('');
$('<img/>', {
src: 'blah.gif'
}).appendTo(this);
Is there a better way to do this?
I have this method for downloading a script:
var script = document.createElement('script');
script.setAttribute("src", url);
document.getElementsByTagName("head")[0].appendChild(script);
This gives me a GET like this:
GET http://127.0.0.1:17315/Scripts/abc.js HTTP/1.1
However I need to add a header:
Authorization: Bearer Ipnsfm9h1MWYIM0n1ng
Can anyone tell me how I can add a header when I am using Javascript to perform the GET?
Hi friends, i have one problem. now i dynamically create a div for displaying images based on image width and height. so how can i find image's width and height before loading images or using image src? help plz
Is it possible to determine this at runtime?
contents of external.js:
function x() {
//can i get the path/name of the html file that included this js file?
//which is test.html
}
contents of test.html
script src="external.js"
I need to include an image within the <a> tag of an ActionLink. What is the best way to do this?
The final rendered link should look like this,
<a href="/Home/Test"><img src="test.jpg" />Test</a>
I am trying to make a bar chart using tables, which I have almost accomplished to my liking. The last step I want is text over my image which represents the bar. Here is the code I have thus far for building my little bar charts:
$height = 50;
//build length
$width = 450;
$multi = $brewAvg / 5;
$width = $width * $multi;
print " <tr > <td > $count. <a href=\"$breweryURL\"> $brewR</a> </td> <td > <img src=\"blueBar.png\" width=\"$width\" height=\"$height\"> </td> </tr> ";
And this produces something like this:
You can see in the code how I simply calculate the length of the bar based on a breweries rating. What I want to do next is have the rating number show on top of each breweries on the left hand side. How would I go about accomplishing this?
Update:
I tried a tutorial I read here:
http://www.kavoir.com/2009/02/css-text-over-image.html
and I changed my code to this:
print "<div class=\"overlay\"> ";
print " <tr valign=\"middle\" > <td > $count. <a href=\"$breweryURL\"> $brewR</a> </td> <td > <img src=\"blueBar.png\" width=\"$width\" height=\"$height\"> </td> </tr> ";
print"
<div class=\"text\">
<p> $brewAvg </p>
</div>
</div>
";
And my css I added was this:
<style>
.overlay {
position:relative;
float:left; /* optional */
}
.overlay .text {
position:absolute;
top:10px; /* in conjunction with left property, decides the text position */
left:10px;
width:300px; /* optional, though better have one */
}
</style>
And it did put any of the value son top of my images. All the text is in a list above all the bars like this:
Is there any field/option/anything that I can put in a TCP packet (be it a syn or an ack or just plain data) that I can be sure will be returned by the other end intact?
For eg. I want to "tag" a particular connection (src, srcport, dst, dstport) with a number that I can always read from a packet belonging to that connection. That means I can identify the connection without using the 4-tuple (as given above).
I have a very simple page that's usings jquery's datepicker. I have:
<input id=datepicker type=image src='cal.png'>
When I click on the image in FF/IE, it works as expected, but does not work in Chrome (ver. 4.1.249.1064). However if I simply change to "type=text", it works within Chrome.
So my question is this: am I allowed to use Datepicker with "type=image"?
Is there a way to make the Iframe request an external website as if it is a mobile device, so the content returned will have a small dimension etc?
I am displaying external websites in iframes, using width and height attributes
<iframe src="http://marketwatch.com" width="300px" height="300px" ></iframe>
but because the browser is not a mobile browser, the content returned is tailored to normal browser, and I end up having scrollbars.
If the content returned is that for a mobile device, then no more scrollbars etc.
This article explained how to do so
http://www.bit-101.com/blog/?p=853
but it doesn't seem to work with Flex SDK 4 as I got this error when building it with Flash Develop (latest version 3):
\Embedding/src/App.as:1: characters 0-7 : parse error Unexpected package
Build halted with errors (mtasc).
So how to correct ?