|
Chrome uses network path.
e.g. local document with iframe file:///F:/test/test.html
to test an document with iframe (IFRAME-tag) use a http server (not local).
may be chrome has an option to turn off this rule.
window.open("htmlfile","frameName") is not an iframe or frame
but what is the path of "htmlfile" ?
check path
iframe is an html document with small javascript interface to parent.
iframe is a single document with own rights (a frame with rights like a pure html document).
I use on ma websides only nested documents ---> IFRAMEs and parent pointer in javascript.
To overlay an document with other document use IFRAME, e.g. transparent background if IFRAME.
example for an IFRAME document
<doctype html="">
eval(parent.decode_javascript_of_iframe());
test(); // init of iframe AFTER decode above
This kind of using an iframe is like using of an "app". It is possilbe to create metro look
like win 8 in use of some iframes. Or iframes can us same place on parent document
(one iframe runs at a every moment).
IFRAME needs some ressources of browser ! Opera is fast. Chrome too. Mozilla is slow.
Only Opera can manage IFRAMEs fast.
On my webside www.twseiten.com you see iframe: See running mouse on top, put a mouseover this mouse
and IFRAME addons bar is visible (on off).
On this webside you find informations for apache http server in windows.
|
|
|
|
|
just copy and paste in browser and test hope you will find your answer
function test() {
document.getElementById("iframe").src = "http://asp.net";
}
</script>
</head>
<body>
<input type="submit" onclick="test()" value="using javascript">
<iframe name="InlineFrame1" id="iframe" style="position:absolute;left:79px;top:118px;width:602px;height:337px;z-index ;" src="" frameborder="0">Your browser does not support inline frames or is currently configured not to display inline frames.</iframe>
<div id="wb_Text1" style="position:absolute;left:101px;top:70px;width:250px;height:16px;z-index:1;">
<span style="color:#000000;font-family:Arial;font-size:13px;"><a href="http://www.lipsum.com" target="InlineFrame1">using html</a></span></div></pre></pre>
|
|
|
|
|
I want to Validate The FileUpload control from Client Side using Javascript. I am not able to Upload more than 4 MB in all the upload controls in the gridview. Please let me know is there any Solution for this.....
|
|
|
|
|
Member 7910360 wrote: all the upload controls in the gridview
I dont know what does it mean.
Anyway, you cant upload more than 4mb is a server issue. Server doesn't allow more than 4mb. It is changeable.
To validate file: all you have to in onchnage action do your validation. if validation success then start uploading otherwise cancel selection by clearing the selected path
I wish I could believe there is an after life.
|
|
|
|
|
u have to do with c# code. It will help u to validate the uploading item size
Kavit Trivedi
|
|
|
|
|
Hi,
In firefox, and chrome, I have a progress bar when someone uploads a file, however the same code doesn't work in IE (surprise surprise), it fails on:
var file = this.files[0];
My question is how do I do the equivalent for IE? Pointing me to the documentation would best.
code is:
function uploadImage(){
$('#percent').progressbar({
value: 0
});
$( "#dialog" ).dialog({
resizable: false,
height:150,
modal: true,
buttons: {
Cancel: function() {
if (xhr){
xhr.abort();
xhr = null;
}
$( this ).dialog( "close" );
}
}
});
document.getElementById('photo').addEventListener('change', function(e) {
var file = this.files[0];
var formdata = new FormData();
formdata.append('file', file);
xhr = new XMLHttpRequest();
xhr.file = file;
xhr.addEventListener('progress', function(e) {
var done = e.position || e.loaded, total = e.totalSize || e.total;
$('#percent').progressbar('value', (Math.floor(done/total*1000)/10));
}, false);
if ( xhr.upload ) {
xhr.upload.onprogress = function(e) {
var done = e.position || e.loaded, total = e.totalSize || e.total;
$('#percent').progressbar('value', (Math.floor(done/total*1000)/10));
};
}
xhr.onreadystatechange = function(e) {
if ( 4 == this.readyState ) {
console.log(this);
$('#src').val(this.responseText);
$('#dialog').dialog('close');
xhr = null;
}
};
xhr.open('post', '/index/fileupload', true);
xhr.send(formdata);
}, false);
}
|
|
|
|
|
try to find a file object or collection for IE at http://msdn.microsoft.com/en-us/library/ms533050.aspx
|
|
|
|
|
Hi,
came acoss this bit of code & don't fully understand it:
Value <<= 1
as in if((Value <<= 1) <= 255).......
I know << is equivalent to XOR but does this mean:
Value = Value << 1
if(Value <= 255)...
or something else???
Also:
value1 ^= value2....
is this equivalent to:
value1 = value1 ^ value2
Some of these short cuts get me and do you think I can find out about <<=...try googling that.
Any help appreciated
|
|
|
|
|
<< means bitshift left
>> is bitshift right
^ is XOR.
and a <operator>= b is the same as:
a = a <operator> b
|
|
|
|
|
“Object doesn't support property or method 'ready'”
I am getting this error while using custom dropdown list with js mootools slider. I have downloaded js slider and custom dropdown and while trying to merge it, I am facing this error.
I have downloaded js slider plugin from here:
http://landofcoder.com/index.php?option=com_jdownloads&Itemid=372&task=view.download&cid=6
Code of index page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Lof SliderNews 1.0 - Mootool 1.1</title>
<link rel="stylesheet" type="text/css" href="css/layout.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script language="javascript" type="text/javascript" src="js/mootools.svn.js"></script>
<script language="javascript" type="text/javascript" src="js/lofslidernews.mt11.js"></script>
<!-- DropDown -->
<link rel="stylesheet" type="text/css" href="msdropdown/dd.css" />
<script type="text/javascript" src="msdropdown/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="msdropdown/js/jquery.dd.js"></script>
<!-- DropDown -->
<style type="text/css">
/** css for override **/
/* move the main wapper to the right side */
.lof-snleft .lof-main-wapper
{
margin-left: auto;
margin-right: inherit;
clear: both;
height: 300px;
}
/* move the navigator to the left side */
.lof-snleft .lof-navigator-outer
{
left: 0;
top: 0;
right: inherit;
}
.lof-snleft .lof-navigator .active
{
background: url(images/arrow-bg2.gif) center right no-repeat;
}
.lof-snleft .lof-navigator li div
{
margin-left: inherit;
margin-right: 18px;
}
.lof-snleft .lof-navigator li.active div
{
margin-left: inherit;
margin-right: 18px;
background: url(images/grad-bg2.gif);
}
</style>
<script language="javascript" type="text/javascript">
jQuery.noConflict();
$(document).ready(function () {
$("#websites2").msDropDown({ mainCSS: 'dd2' });
});
</script>
</head>
<body>
<div id="container">
<h1>
<strong>Lof SliderNews 1.0</strong> - Mootool 1.1</h1>
<p>
<strong>Direction: Up to Down - Navitagor on the left side .</strong> The plugin
allow to use the wheelup and wheeldown to previous|next item in the list
</p>
<!------------------------------------- THE CONTENT ------------------------------------------------->
<div id="lofslidecontent45" class="lof-slidecontent lof-snleft">
<div class="preload">
<div>
</div>
</div>
<!-- MAIN CONTENT -->
<div class="lof-main-wapper">
<div class="lof-main-item">
<select name="websites2" id="websites2" style="width: 258px;">
<option value="msDropDown">One</option>
<option value="PrototypeCombobox">Prototype Combobox</option>
<option value="jQuery Tabs">jQuery Tabs</option>
<option value="Common Accordion">Common Accordion</option>
</select><br />
</div>
<div class="lof-main-item">
Page2
</div>
<div class="lof-main-item">
Page3
</div>
<div class="lof-main-item">
Page4
</div>
<div class="lof-main-item">
Page5
</div>
<div class="lof-main-item">
Page6
</div>-->
</div>
<!-- END MAIN CONTENT -->
<!-- NAVIGATOR -->
<div class="lof-navigator-outer">
<ul class="lof-navigator">
<li>
<div>
<img src="images/lofthumbs/791902news3.jpg" />
<h3>
NewsFlash 1
</h3>
<span>20.01.2010</span> - In id, mauris viverra asperiores, bibendum in id. Eu molestie.
Ac sit eu...
</div>
</li>
<li>
<div>
<img src="images/lofthumbs/435576news10.jpg" />
<h3>
NewsFlash 2
</h3>
<span>20.01.2010</span> -In id, mauris viverra asperiores, bibendum in id. Eu molestie.
Ac sit eu. ..
</div>
</li>
<li>
<div>
<img src="images/lofthumbs/641906img1.jpg" />
<h3>
NewsFlash 3
</h3>
<span>20.01.2010</span> - In id, mauris viverra asperiores, bibendum in id. Eu molestie.
Ac sit eu. ..
</div>
</li>
<li>
<div>
<img src="images/lofthumbs/416719news7.jpg" />
<h3>
NewsFlash 4</h3>
<span>20.01.2010</span> - In id, mauris viverra asperiores, bibendum in id. Eu molestie.
Ac sit eu. ..
</div>
</li>
<li>
<div>
<img src="images/lofthumbs/641906img1.jpg" />
<h3>
NewsFlash 5</h3>
<span>20.01.2010</span> -In id, mauris viverra asperiores, bibendum in id. Eu molestie.
Ac sit eu. ..
</div>
</li>
<li>
<div>
<img src="images/lofthumbs/416719news7.jpg" />
<h3>
NewsFlash 6</h3>
<span>20.01.2010</span> - In id, mauris viverra asperiores, bibendum in id. Eu molestie.
Ac sit eu. ..
</div>
</li>
</ul>
</div>
</div>
<script type="text/javascript">
jQuery.noConflict();
var _lofmain = $('lofslidecontent45');
var _lofscmain = _lofmain.getElement('.lof-main-wapper');
var _lofnavigator = _lofmain.getElement('.lof-navigator-outer .lof-navigator');
var object = new LofFlashContent(_lofscmain,
_lofnavigator,
_lofmain.getElement('.lof-navigator-outer'),
{ fxObject: { transition: Fx.Transitions.Quad.easeInOut, duration: 800 },
interval: 3000,
direction: 'vrdown'
});
object.start(true, _lofmain.getElement('.preload'));
</script>
</div>
</body>
</html>
Please reply ASAP.
Thanks.
|
|
|
|
|
You've used jQuery.noConflict() and then tried to access jQuery using the $() function. If you use noConflict, you have to use the full jQuery() function instead of $() - see here for details: http://api.jquery.com/jQuery.noConflict/[^]
|
|
|
|
|
Tried TypeScript? I've been playing around with it for a few days and I'm not sure what I think of it. It's almost javascript, but you get some benefits by using types and maybe a easier syntax.
I installed Mads Kristensen's Web Essentials 1.3 and of course the official plug-in for Visual Studio
Web Essentials crashes from time to time, but Mads is working on it
Do you have any experiences using TypeScript? Maybe some examples to share? How do you solve using libraries like jQuery(ui), knockout, underscore etc? It's really boring to write all these typescript interfaces. Typescripts homepage should have a directory for interfaces for the most used js-libraries (or maybe such directory exists somewhere?)
--------------------
When Chuck Norris' dreams come true, your worst nightmares begin.
|
|
|
|
|
Had installed this plugin and must say that it is tragically slow for me.
Now it is disabled and i don't think I will ever enable this again since it don't add anything useful.
And for type script? I really don't understand why people want to do C from JS. It is dynamic language. Type checking is fun
and make thinks little easier. But JS is for DOM manipulation and client events. Nothing serious really.
I had written bigger library with JS for WebGL, and I must say that this language is not for that kind of work. Now trends for doing rich, complicated web apps is good, but in my opinion we trying to force JS to do work it not suppose to. I think we need better language for this, and experiments coffe script, and type script is half step into good direction. If you have know JS anyway it isn't a solution.
No more Mister Nice Guy... >: |
|
|
|
|
|
n.podbielski wrote: in my opinion we trying to force JS to do work it not suppose to. I agree with you.
/ravi
|
|
|
|
|
|
Please open any website like msn.com or yahoo.com and hover the mouse over links you will get underline effect then click on any sub menu and do the same again this time you will notice that underline have still persist under links even you will go to other links on the page. how can we resolve this issue, feel free to ask me if any thing specific required input from my side.
Thanks,
Ambesha
|
|
|
|
|
Ambesha wrote: feel free to ask me if any thing specific required input from my side.
Yes. we ask that you post your question ONCE. Crossposting like this only annoys those who might otherwise help you.
Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
function favAnimal(button) {
alert('You like '+button.value+'s.');
}
Kangaroo
Opossum
Tasmanian Tiger
|
|
|
|
|
Does any of the message you posted have a purpose?
Regards,
Jon
|
|
|
|
|
One approach is to provide a message that the form has been submitted, and then provide some means to prevent the web page reader from submitting the form again. In its simplest variation, the following would work:
function validateSubmission(evt) {
...
alert("Thank you, we're processing your order right now");
document.getElementById("submitbutton").disabled=true; // disable
Multiple concurrent form submissions are one of the worst problems that can occur in a user interface. Most people would be unhappy if, say, they found they had purchased two of the same item when they were only expecting to purchase one.
There are several different approaches you can take to prevent duplicate form submissions, and how strict you want to be depends on the seriousness of the double submission.
Custom and high Qualified ASP.Net Web Development Services
asp.net development
|
|
|
|
|
|
It really depends on what you are doing. There are a lot of UI test suites out there.
I personally do a lot of jQuery development and find that the qUnit framework works great. You could give that a go.
Thanks!
Spiff
|
|
|
|
|
I have been working on a project that requires me to create a vertical auto-hide toolbar that appears on the right side of the webpage. I am not even sure if that is possible using javascript as I am quite new to javascript.
|
|
|
|
|
If you question is if it is possible in Javascript?
My Answer is yes quite possible. As a matter of fact you just gave me the idea. I will implement this for my in house application today.
For your help:
read about
1. CSS visibility
2. OnMouseOver action
3. OnMouseOut action
I wish I could believe there is an after life.
|
|
|
|
|
Ok, thanks for your help.
|
|
|
|