|
Great, that was a good explanation.
Thanks Richard!
|
|
|
|
|
constructor of "ype "m" is function manager(){...}
m = new constructor (...)
m is a pointer !
e.g. new Function(...) creates a pointer of a function
new Function() is a member of Javascript predefines types (predefined constructor)
so manager() runs like new Function() ?
function manager()
{
var anObject = {prop1: 1, prop2: 2};
// local var !!!!
// does not exists after the end of constructor
// use global var !
.
.
.
return
{
getMyObject: function(){
return anObject;
}
// local function !!!!
// does not exists after the end of constructor
// use global var to save the pointer.
}
|
|
|
|
|
Hi All
I need to emulate bandwidth throttling scenario on my web application, I have two buttons, when user click on first button then play a video from my server, this should be poor user experience (through bandwidth throttling on this session between my laptop and my web server)
On the other hand when user clicks a second button, and then play same video(HTML5 video), then better quality of experience should be observed,
Is there a way I can achieve this using java-script?
|
|
|
|
|
readystatechange event ist useable for AUDIO, see
http://msdn.microsoft.com/en-us/library/hh772923%28v=vs.85%29.aspx
javascript runs only on client, sou you must use interface to catch state of an element
its events like readystatechange-event
|
|
|
|
|
Hi
I have worked in front end but in the company I worked we don't do any cross browser compatibility.
How we can do the cross browser compatibility.
What are the steps? it is a interview question
Can anybody help with it.
Thanks,
Mary Abraham
|
|
|
|
|
|
Thanks Peter I got an Idea.
Mary Abraham
|
|
|
|
|
If you need to access to a server that don't support CROS and that your data is not sensitive (public data like weather, music info or anything) you can try this :
CROSProxy[^] you'll not have to change your source code also !
|
|
|
|
|
Create a super class ComputingMachine. This class should be designed as parent class of any kinds of computing devices like calculators, timers, mobile phones, etc. Computing machines’ basic attributes includes its manufacturer’s name, product code and classification. You may wish to add more attributes. Along with all the basic methods (constructor, accessor, mutator, output, comparison, and other helper methods), define a method compute() which has nothing to do yet. This method will be overridden in future subclasses.
Extend the ComputingMachine class to two subclasses, Calculator and Timer. Add the necessary attributes and methods for them. These subclasses must implement the BasicOp interface which you must create. The BasicOp interface will require the implementation of methods plus(), minus(), times(), and divideby(). If any one of these methods are not applicable to the class which implements it, the class must be able to handle it.
In the demo class, calculator object must be able to continuously perform the BasicOp methods for two operands until the method compute is invoked, behaving like a simple calculator of the real world.
Timer object in its own demo class, must perform as a countdown timer or a usual lapse timer depending on the users choice.
roni
|
|
|
|
|
Don't repost questions[^], In Q/A section some people made comments to your question. Read that again.
thatrajaCode converters | Education Needed
No thanks, I am all stocked up. - Luc Pattyn
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is - Henry Minute
|
|
|
|
|
Is there a question or are you looking to hire someone?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
How to do the method compute() ?
|
|
|
|
|
What do you mean?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Are you sure this is a Javascript question?
|
|
|
|
|
Good Day All
i am opening a Popup and i want to bind the "onbeforeunload" to the popup that if someone clicks on the close button in the window or close button in the page , the event should fire a javascript function that is on the page that opened the popup.
function ProcessPayment(Downloadurl)
{
var url = "http://XXXX.com/cccc_ccccc/2938dc870cd394?tc_id=210&tc_45f=50.0&sig=fc5cbfe44230";
var popupWindow = window;
popupWindow.onbeforeunload = function () {
if (Downloadurl != "") {
$.fileDownload(Downloadurl)
.done(function () { alert('File download a success!'); })
.fail(function () { alert('File download failed!'); });
}
else {
alert("No URL found");
}
}
popupWindow.open(url, 'popUpWindow', 'height=400,width=500,left=10,top=10,resizable=no,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no,status=yes')
when i try this nothing happens the event does not get work and no error in the browsers console
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
Please do not use pop ups!
Popups are a very ugly way of shoving some data into the users face, in a way he probably doesn't like and didn't ask for. The only thing that should open a new window or tab is me middle-clicking (or right-clicking) a link. Everything else should stay in the existing window.
|
|
|
|
|
hi Nicholas
I am building a mobile app using cross-platform mobile development toolkit, so this is something that gets popup when a third-party payment is required.
thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
Our app uses popups all the time. It works like Microsoft CRM. When you double-click a grid record we open the record maintenance in a popup.
Popups have their place but they did get a bad name because of people misusing them.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
|
hi Kornfeld
let me have a look at the link you sent.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
I'm pretty sure that event has to be in the window itself, you can't attach your own. I could be wrong though.
Also, popupWindow.open() can be done modally so you can get the return value from it. If the return value is null, depending on the window, that could be the indication you are looking for.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
|
Hi
I am new user I want to open file on network drive like \\10.30.50.88\project\test\product\Daily\Reports\form.html and try to save on \\10.30.50.88\project\test\product\Daily\Reports\data.txt
But when Click on submit button it show error message
Error: Number:-2146827859 Description:Automation server can't create object
Please help me out . I want to replace “d:\\data.txt “ with “\\10.30.50.88\project\test\product\Daily\Reports\data.txt “
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Name</title>
<SCRIPT LANGUAGE='JavaScript'>
function WriteToFile() {
try {
var fso, s;
fso = new ActiveXObject("Scripting.FileSystemObject");
s = fso.OpenTextFile("d:\\data.txt" , 8, true, 0);
s.writeline(document.ietmdata.name.value + ", " + document.ietmdata.email.value + ", " + document.ietmdata.location.value + ", " + document.ietmdata.type.value );
s.Close();
}
catch(err){
var strErr = 'Error:';
strErr += '\nNumber:' + err.number;
strErr += '\nDescription:' + err.description;
document.write(strErr);
}}
</SCRIPT> </head>
<BODY>
<form action="test.hta" method="post" name="ietmdata" >
Name: input type = "text" name="name"<br>
Email: input type="text" name="email"<br>
Location: input type = "text" name="location"<br>
Type: <select name="type" >
<option value="Software"> Software </option>
<option value="Hardware"> Hardware </option>
</select>
<br><br>
<INPUT TYPE=BUTTON VALUE="Submit Data to Text File" önClick="WriteToFile(this.form)">
</form>
</body></html>
|
|
|
|
|
DO NOT repost the same question!
You have already posted this question twice in QA and once in this forum. The first QA post even has an accepted answer.
Reposting the same question will not make the unpaid volunteers who help out on this site more likely to answer it. If anything, it will encourage us to ignore your question.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I am using kendoui un MVC.
Datepicker has watermark, if date is blank val()='' works fine in FF and Chrome but not in IE11.
In IE11 it shows the watermark value
any suggestion how to overcome this issue?
|
|
|
|