OpenLayers print function not working - javascript

Taking the function as in Save google map as an image - using javascript (able to take screenshot) , the solution ceased to work, as it is now generating an error on
var comp=transform.split(",");
It seems that the object returned by
$(".gm-style>div:first>div")
doesn't have the css property.
Does anyone know what's going on?
Thanks is advance

ok, i got it to work using
$(".olMapViewport>div:first>div").css("transform");
it seems that .gm-style may not work in some situations.

Related

Dropdown values are not populating

I Can see values coming through in console but the same values are not getting displayed in a webpage(Attached image(s) for easy imagiantion).
Can someone help me with the possible/expected scenarios.
Can't see values in dropdown.
Values are present/seen in console
P.S: It works well when I use Chrome browser and its a cascading menu.
Usage of "this" keyword got me in to this problem. While on my research I've used "document.getElementByID" to fetch values dynamically instead this keyword.
Thanks for your time.It's working now.
Edit: Kind of issue to one of my mates, he forgot to add text-size.

Clicking JavaScript in Ruby/Watir

Is there ANY way to click a JavaScript link using the Watir webdriver? I've looked around for hours and nothing has helped me.
Here's what the link looks like: MULTIPLY YOUR BTC
I've tried using browser.link(:id, "double_your_btc_link2").click and a bunch of other stuff including Xpath (it kept saying it couldn't follow the path) and nothing works. Is it even possible?
If you need the page, here it is.
That should have been:
browser.link(:id => "double_your_btc_link2").click
Sorry to waste your time, guys. I just used Firefox instead of Chrome and it worked fine. This isn't even the first time I've had a problem with accessing JavaScript elements in Chrome...thanks anyway.

Toggle multiple div elements

On my page I'm currently doing something like this: http://jsfiddle.net/FBCSt/6/ I really don't know why, but in Chrome I got some strange issues with that - sometimes the contents of the div elements are not loaded correctly. In IE, Safari and Firefox it work fine, but as I said, in Chrome it is causing some trouble.
That's why I want to know, if there is a more sleek way to do this? (There are three buttons, every one is assigned to one div. Only one div should be visible)
I am thankful for every answer =)
EDIT: Thanks everybody. This is the solution. It works well =)
"a better way: jsfiddle.net/FBCSt/13 – #Mohammed ElSayed 20 mins ago"
Try this: http://jsfiddle.net/FBCSt/10/
In IE, Safari and Firefox it work fine, but as I said, in Chrome it is
causing some trouble.
I really don't see an issues when testing under Google Chrome 19.0.1084. But in any case,
That's why I want to know, if there is a more sleek way to do this?
Yep, there is. Since one of your tags is jQuery, I suggest you take a look at jQuery UI's tabs.
Why don't you use show() instead of toggle()? Maybe the issue is related to using toggle(). And you can combine the elements to be hidden: For example,
$('#page2,#page3').hide();
$('#page1').show();
Or as nicely put by Mohammad,
$('#page1').show().siblings().hide();
I have working solution on this url : pastebin it works in chrome and also in FF.also it will work even if you add 1000 id with page#100 but still it will not have too much code. thanks.
Like Abody97 said: try JQuery UI tabs
If you're looking for a "more sleek" way of doing this, try this fiddle: http://jsfiddle.net/NCbW6/
It doesn't bother with specific ids for each element so you can add as many as you'd like without changing the JS.

What's wrong with this tinyscrollbar?

http://jsfiddle.net/J74VS/4/
I can't get it to work properly, I'm just trying to create a basic fiddle of a tinyscrollbar.
The problem was the missing css. I mistakenly thought all you need is $("#scrollbar1").tinyscrollbar() to activate it.
Working fiddle.

Scrolling in Webview Progmatically

I am having a webview which dispalys large amounbt of data. I want to scroll Webview progmatically. I know window.scrollto() method is there but ,god knows why, it is not working. Can anybody guide me step by step how to do this ? I am sure there is some minor problem. Pl. guide me.
simplest possible way i am aware about is adding url?param=value#id technique. I am not sure is you are looking for this but it works nicely. This is called fragment identifier
I think that you may have a syntax error. Its element.scrollTo(x-coord, y-coord) :)
Sample code would be useful if you have some for us.
Is it the actual window that has a scroll or is it some element inside the window that has a scroll.
You should try to alert your x-coord and y-coord just before you call scrollTo() to see if there are actual values there.

Categories

Resources