Like I mentioned this is for IE9. For FF, Chrome, etc. Im using that HTML 5 full screen API (which works so so; Tried it on a older version of Firefox and did not work)
Also it would be a button; Nothing automatic.
Like I mentioned this is for IE9. For FF, Chrome, etc. Im using that HTML 5 full screen API (which works so so; Tried it on a older version of Firefox and did not work)
Also it would be a button; Nothing automatic.
Hello
I want to create a button that when the user clicks on it, the browser goes automatically fullscreen. It would be for mainly IE9 and I use for the rest of the browsers the HTML5 fullscreen API.
Thanks
Not sure what else to try.....
What would be the standard nonjQuery way? Maybe that will work.
Id start with FirePHP and tell us if thats good enough or if something is missing...
Tried different ways but it doesnt seem to work
OK, debugger is working pretty good for now. Ill keep playing with that.
Thank you.
Here is a example:
startListeners: function(){
this.canvas.mousedown(function(e){
this.handleCanvasMouseDown(e);
}.bind(this));
},
$j('#combobox').change(function() {
alert("hi");
});,
handleCanvasMouseDown: function(e){
this.drawManager.unSelectAllPointsOfTheDrawingThatHasPoints();
},
With and without the comma in the "});" it fails, giving me that error.
https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html (My tests: Works in Firefox and Chrome. IE9 does not support it)
Having said that, I am completely against this method and I hope it gets dropped by the time the standard is finalized.
Hello
By the way Javascript works Im not sure if this is possible but I would like to debug Javascript much like debugging C# or/and Java; I put a breakpoint in a line and press (for example) F5 so it goes to the next line/function and pauses and keeps going each time I press a key.
Is there any way how to do this?
Thanks :)
for(var i = 0; i < draws.length; i++) {
var draw = draw[i];
}
There is another each there; Could you translate it as well?
(I know more or less but I want to be 100% sure
What type of WebService are you thinking of? SOAP or REST?
Since my current one is implemented in SOAP, I guess Ill go with SOAP.
Sadly that link is for a REST web service :(
Hello
I wish to convert the following jQuery each to fors....This way I can see it a lot clearer....
var draws = this.canvasListener.getDrawManager().getAll();
$j.each(draws, function(index, draw) {
var points = draw.getPointManager().getAll();
$j.each(points, function(index, point)
{
}.bind(this));
}
Yes, I know "each" is faster and better optimize but I dont care.
What is the equivilent in a for loop?
Thank you
What's with the comma at the end of line 3?
More functions follows it
Hello
I want to make a C# web services for XAMPP (basically Apache). I know I have to download a mod for this but first thing is first:
Where is a good guide to read on how to create a web service? Guides Ive found are either outdated or very comlpicated when it comes to wording at least.
Once I get that understood, then we can get running it on XAMPP.
Any other ideas on how to do this?
Your
I do not know how to make it synchronous in JQuery
comment made me think and I did this:
formapredeterminada: function(point)
{
var varpas=$j('#iddetienda',window.parent.document).text();
varpas.replace(/\s/g, "");
$j.ajax({ // Start AJAX function
url: 'mysqlcall.php', //script para obtener datos
async: false,
data: "idpastelero="+varpas, //you can insert url argumnets here to pass to api.php
//for example "id=5&parent=6"
dataType: 'json', //data format
success: function(data) //on recieve of reply
{ //start success function
var selecthtml='Formas predeterminadas: <select name="dibujoshechos" id="dibujoshechos">'
for (var i=0;i<data.length;i++)
{ //start for
var row = data[i];
var nombre = row[0]; //nombre
var coordenadas = row[1]; //coordenadas
selecthtml=selecthtml+'<option value="'+coordenadas+'">'+nombre+'</option>';
}
selecthtml=selecthtml+'</select>';
$j('#formas').append(selecthtml);
} //end sucess
}); //end ajax function
var draws = this.canvasListener.getDrawManager().getAll();
$j.each(draws, function(index, draw) {
if (draw.hasPoints() && draw.isPointSelected()) {
//Modificaion
var points = draw.getPointManager().getAll();
$j.each(points, function(index, point)
{
}.bind(this));
}
}.bind(this));
var lospuntos="";
lospuntos=$j("#dibujoshechos").val();
console.log("value is " + lospuntos);
this.canvasListener.redraw();
},
And I got a console output and the correct console output at that.
Thank you
New code:
formapredeterminada: function(point)
{
var varpas=$j('#iddetienda',window.parent.document).text();
varpas.replace(/\s/g, "");
$j.ajax({ // Start AJAX function
url: 'mysqlcall.php', //script para obtener datos
data: "idpastelero="+varpas, //you can insert url argumnets here to pass to api.php
//for example "id=5&parent=6"
dataType: 'json', //data format
success: function(data) //on recieve of reply
{ //start success function
var selecthtml='Formas predeterminadas: <select name="dibujoshechos" id="dibujoshechos">'
for (var i=0;i<data.length;i++)
{ //start for
var row = data[i];
var nombre = row[0]; //nombre
var coordenadas = row[1]; //coordenadas
selecthtml=selecthtml+'<option value="'+coordenadas+'">'+nombre+'</option>';
} //end for
selecthtml=selecthtml+'</select>';
$j('#formas').append(selecthtml);
var draws = this.canvasListener.getDrawManager().getAll();
$j.each(draws, function(index, draw) {
if (draw.hasPoints() && draw.isPointSelected()) {
var points = draw.getPointManager().getAll();
$j.each(points, function(index, point)
{
}.bind(this));
}
}.bind(this));
var dot="";
dot=$j("#dibujoshechos").val();
console.log("value is " + dot);
} //end sucess
}); //end ajax function
this.canvasListener.redraw();
},
The console line doesnt get printed out at all.
Same thing.
"the value is undefined"
No error.
Same thing.
"the value is undefined"
No error.
This is my code:
formapredeterminada: function(point)
{
var varpas=$j('#iddetienda',window.parent.document).text();
varpas.replace(/\s/g, "");
$j.ajax({
url: 'mysqlcall.php', //script para obtener datos
data: "idpastelero="+varpas, //you can insert url argumnets here to pass to api.php
//for example "id=5&parent=6"
dataType: 'json', //data format
success: function(data) //on recieve of reply
{
var selecthtml='Formas predeterminadas: <select name="dibujoshechos" id="dibujoshechos">'
for (var i=0;i<data.length;i++)
{
var row = data[i];
var nombre = row[0]; //nombre
var coordenadas = row[1]; //coordenadas
selecthtml=selecthtml+'<option value="'+coordenadas+'">'+nombre+'</option>';
}
selecthtml=selecthtml+'</select>';
$j('#formas').append(selecthtml);
}
});
var draws = this.canvasListener.getDrawManager().getAll();
$j("#dibujohechos").val('1');
var lospuntos="";
var lospuntos = $j("#dibujoshechos").val('1');
console.log("the value is " + lospuntos);
this.canvasListener.redraw();
},
No errors, just says undefined.
When I try it in my PC it works fine.. One question . Why do you use $j ?
Check the following code. It's my code
Because my jquery is defined this way.
Also, are you sure your code is this way? You have a </htm> tag at the end which is at least not standard and should not work.
Try this
var optionalValues=[];
$('#combobox option').each(function(){
optionalValues.push( $(this).attr('value'));
});
var FirstOption = optionalValues[0];
alert(FirstOption);
Nothing. Still same thing. Says it is undefined.
Tried that code but it gives me a error
SyntaxError: missing : after property id
Also tried:
$j('#dibujoshechos').change(function() {
alert($j(this).val());
}); ,
And with double quotes: Nothing. Same error. I remove this code and it works perfectly.
I think most thickboxes, lightboxes, dialogs etc reserve the top strip to move it around, I can't remember one that you can grab and drag from anywhere.
Undoable with thickbox.
Hello
I have a combobox which has some values. When I click on it and select a item (with my mouse, for now) I want to get those values. Im not sure if its mousedown or comboboxchange or how its called.
Now Im a completely noob when it comes to events in Javascript so if you could post the "standard" function for it, thats great. From there, I THINK, I can work it out.
Also I use jQuery if it helps out.
Maybe it should be $j("#mydiv").val('1');?
Putting:
$j("#combobox").val('1');
var myvariable="";
var myvariable = $j("#combobox").val('1');
console.log("print out " + myvariable);
Prints out
print out [object Object]
I know the combobox is indeed populated.
Yup. That solved it. Tried that, it worked, and I forgot to mention it. Now I see you did.
Thank you.
Ive created a dropdown box dynamically getting datea from a database but when I try to get (or set) the first value, it always says undefined.
Ive tried something like:
$j("#mydiv").val(1);
var somevariable = $j("#mydiv").val();
console.log ("print it out " + somevariable);
And it says
print it out undefined
If I add a alert it works. Seems to be because of a delay so I how can I get it to work? Thank you.
Today I got a warning for "profanity".........Come on.
<!DOCTYPE html>
<html>
<head>
<title>Google Maps JavaScript API v3 Example: Map Simple</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<style>
html, body, #map_canvas {
margin: 0;
padding: 0;
height: 100%;
}
</style>
<script src="https://maps.googleapis.com/maps/api/js?key=PUTYOURKEYHERE&sensor=false"></script>
<script>
var map;
function initialize() {
var mapOptions = {
zoom: 8,
center: new google.maps.LatLng(-34.397, 150.644),
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById('map_canvas'),
mapOptions);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body>
<div id="map_canvas"></div>
</body>
</html>
If you truely have a API v3 key, then just copy and paste this code in a HTML page and where it says "PUTYOURKEYHERE", replace it with your API v3 key and it should work perfectly.
Perhaps some quoting error in your code triggers this. Check your single and double quotes.
Well here it is as you told me:
formapredeterminada: function(point)
{
var varpas=$j('#iddetienda',window.parent.document).text();
varpas.replace(/\s/g, "");
$j.ajax({
url: 'mysqlcall.php', //script para obtener datos
data: "idpastelero="+varpas, //you can insert url argumnets here to pass to api.php
//for example "id=5&parent=6"
dataType: 'json', //data format
success: function(data) //on recieve of reply
{
var selecthtml='Formas predeterminadas: <select name="dibujoshechos" id="dibujoshechos">'
for (var i=0;i<data.length;i++)
{
var row = data[i];
var nombre = row[0]; //nombre
var coordenadas = row[1]; //coordenadas
alert(coordenadas);
selecthtml=selecthtml+'<option value='+coordenadas+'>'+nombre+'</option>';
}
selecthtml=selecthtml+'</select>';
$j('#formas').append(selecthtml);
}
});
this.canvasListener.redraw();
},
That alert you see there prints out exactly what is in my database (no single or double quotes there) so I know its reading the value correctly.
So I guess its something in the Javascript code that is incorrect. What is it?
Highslide looks nice. I just wish it was movable from all the edges (top, bottom, right, left, upperright, botton left, etc) as I dont need to resize it.
Ill try to see if I can implement it easy in my system...
OK that worked.
Im trying to read something else from the DB but it has characters like ":" and "#" and "#X" which for some reason the query is getting incorrectly and when I try to insert it into the option value it comes out weird like such:
<option spline#="" 306="" 410="" 209="" 234="" spline#x:="" type:="" 382="" y:="" 274="" value="X:">Forma aleatoria</option>
While the value is in my database (and should be):
X: 274 Y: 382 Type: spline#X: 234 Y: 209 Type: spline#X: 410 Y: 306 Type: spline#X: 274 Y: 382 Type: spline#
Expanded code:
formapredeterminada: function(point)
{
var varpas=$j('#iddetienda',window.parent.document).text();
varpas.replace(/\s/g, "");
$j.ajax({
url: 'mysqlcall.php', //script para obtener datos
data: "idpastelero="+varpas, //you can insert url argumnets here to pass to api.php
//for example "id=5&parent=6"
dataType: 'json', //data format
success: function(data) //on recieve of reply
{
$j('#formas').append("Formas predeterminadas: <select name='dibujoshechos' id='dibujoshechos'>'");
for (var i=0;i<data.length;i++)
{
var row = data[i];
var nombre = row[0]; //nombre
alert(nombre);
var coordenadas = row[1]; //coordenadas
$j('#formas').append("<option>"+nombre+"</option>")
}
$j('#formas').append("</select>");
}
});
this.canvasListener.redraw();
},
As you can see the for loop is executed inside the sucess part; Do I move it out or something?
Hello
Im wondering if Thickbox is movable. If not, is there a alternative that I can quick change to (meaning almost no transtition) so I make a modal window movable....Must support iframes.
https://google-developers.appspot.com/maps/documentation/javascript/examples/map-simple
There is a map example. View the code. It is VERY easy....
BTW, noone knows "simple Dreamweaver" as it is a program, not a programming language. What you may/may not know is PHP/JS/HTML/etc....
The question is why?
The website seems to be recreational (nothing towards coorp users) which would be at MIN running Windows 2000 (Windows 2000 can run up to IE6 only). XP (your true MIN "core audicence") runs up to IE8. You should test against IE8 if anything.
Even if that, if this is a new website, its for your future audicence: Most of your future audicence will be running at least IE9.
Web developers have to STOP testing against old versions of Internet Explorer. This is 2013 people. If it doesnt work, the public should upgrade to a newer version of their browser, not the other way around. IE6 is older than XP. IE8 can run on ALL OSs (except Windows 2000) than run IE6.
If you really want to help your users, detect if they are running IE6 and Windows 2000 (or below), and resend them to a page that explains in a easy format that they should use another browser such as Firefox or Chrome. If they are using IE6 and something newer than Windows 2000, directly redirect them to the internet explorer homepage.
DO NOT HOLD WEB DEVELOPMENT BACK AND MAKE IT EASIER FOR THE REST OF US DEVS.
Just to comment:
data: {'username' : value},
Im not sure if that actually works, specially with GET.
I say this because Im doing something similar (also with GET) and I use
data: "parameternametopass="+valueofvariablestopass,
And it works for me.
On difference is that my datetype is JSON and yours is HTML.
Almost got it to work
I have this:
$j('#formas').append("Formas predeterminadas: <select name='dibujoshechos' id='dibujoshechos'>");
for (var i=0;i<data.length;i++)
{
var row = data[i];
var nombre = row[0]; //nombre
alert(nombre);
var coordenadas = row[1]; //coordenadas
$j('#formas').append("<option>"+nombre+"</option>")
}
$j('#formas').append("</select>");
Yet the HTML comes out like this:
<div id="formas">
Formas predeterminadas:
<select id="dibujoshechos" name="dibujoshechos"></select>
<option>Forma aleatoria</option>
</div>
Why does it close the combobox before the for loop when I have it in this order?
My default HTML code is the empty div.
Isnt the for a infinite loop? I tried doing it and I was about to get a reply (and the correct answer because I see it in a alert box) but since it is a infinite loop (I say this because it shows the first one but the first are undefined) I think it crashes at the end
You need to loop trough data, rows is undefined.
The reason that I did not know that rows was even undefined is because I do not know how to call this function...
Thats what I need to know: How do i call this function (the JS) to run it as soon as the jQuery iframe window comes up?
When this does happen, it sometimes also places the last few lines from the paste operation (clipboard buffer?) in the post as well as whatver keys I'm currently pressing.
Exactly what I described.
And the posting horror continue:
Today I copy paste code into the shitty editor and all of the sudden I start typing normal letters in the post box and whatever is above it that was "code quoted" get typed AGAIN...
I have something similar to this:
<div id="somediv">
</div>
Later MY JS:
$j.ajax({
url: 'mysqlcall.php', //script para obtener datos
data: "idpastelero="+varpas, //you can insert url argumnets here to pass to api.php
//for example "id=5&parent=6"
dataType: 'json', //data format
success: function(data) //on recieve of reply
{
$j('#somediv').append("Formas predeterminadas: <select name='dibujoshechos' id='dibujoshechos'>");
for (var i in rows)
{
var row = rows[i];
var nombre = row[0]; //nombre
var coordenadas = row[1]; //coordenadas
$j('#somediv').append("<option value="+coordenadas+">"+nombre+"</option>'")
}
$j('#somediv').append("</select>");
}
});
Basically thats it.
The answer in the second link shows you how. If you can show the code you have so far, it would be easier to guide you.
I know, I saw :) Tried to implement it but wasnt sure how to "run it".
Reason why I asked:
How do I call the function that reads the database then loads the combobox when this jQuery window is opened?
If I dont know how to do that, I cant test it out.
I have a project where my code will have to coexist with code in web pages designed elsewhere. My code will use jQuery, and so there may be an issue if the parent page already runs jQuery (and maybe jQuery plugins). I would have thought the correct thing to do would be to add my jQuery version at the closing <body> tag (so it loads last) and then do: var myJQ=jQuery.noConflict(true); That way I hand back '$' and 'jQuery' to the page's own jQuery code and plugins so that they use the version of jQuery for which they were designed. But the jQuery docs warn that using 'true' may prevent other plugins working. I would like to understand that - but I'm afraid I don't get it! Surely it's the other way round? If I simply do "noConflict()", then pre-existing code using the jQuery variable will be using a different version than planned for, and that might cause problems? Whereas "noConflict(true)" would protect against that?
I have a project where my code will have to coexist with code in web pages designed elsewhere. My code will use jQuery, and so there may be an issue if the parent page already runs jQuery (and maybe jQuery plugins). I would have thought the correct thing to do would be to add my jQuery version at the closing <body> tag (so it loads last) and then do: var myJQ=jQuery.noConflict(true); That way I hand back '$' and 'jQuery' to the page's own jQuery …
Man that was a mouthful!
Basically I have a page which when I click on a button, a jQuery (iframe) window comes up. Here there is a combobox that should be filled with values I read from a database.
Ive been reading two pages:
http://openenergymonitor.org/emon/node/107
http://stackoverflow.com/questions/8019489/simple-ajax-jquery-script-how-can-i-get-information-for-each-of-the-rows-in-the
But Im having problems not only understand it but applying it to my situation. One of the reasons is that lets say my query is this:
select name,lastname from people where age=19
this would return something like
adam brown
james lay
bill bult
As you can see 3 rows. The first example only allows one row to be returned/used and I tried seeing the second link but it seems I can just not apply it correctly.
Pretty much, I have problems with everything from getting the data and filling the combobox.
How do I call the function that reads the database then loads the combobox when this jQuery window is opened?
For now that is my main problem.
Thank you
Since you are using jQuery, you should be able to use:
$j(idtext, window.parent.document).trigger('click');
That does not work.
Hello
Ive created a button dynamically using Javascript and now I want to automatically click on it.
The code I create (actually modify) the button is something similar to:
$j(idtext, window.parent.document).html('I am a button<input type="hidden" id="imagenv" name="imagenv" value="'+imgstr+'"/>');
Now I want to automatically click on it. Ive tried .live() (I have jQuery) but it doesnt work and I think it doesnt work because the the button I want to click is not in the same document, its in the parent (as you can see the button called idtext is in the "window.parent.document").
So How do I do this?