We're calling an ad from an ad network to dynamically load an add using JavaScript. It makes an iFrame with the actual ad in it, a picture wrapped in an anchor tag with the target=_top. Is there a way from our page to change its target and capture the attempt to change our page.
Also, our page is loaded in a C#.net program using a WebControl (I forget the actual control being used since it was a while ago).
We can change the C# code but we really prefer not to because then we'd have to test it and everything. Is there a way to do this with JavaScript or JQuery?
I have changed code around to basically load an add the bottom of the page in a hidden div and attached an onload event handler that called document.getElementById(xxx).appendChild() to take the hidden ad and move it into the right spot in my page. This works GREAT.. however when the ad is a text ad it AFTER i move the ad there is nothing in the rendered Iframe. I did tests to see what it looks like before i move it and sure enough the text links load in the IFRAME but the second i do the appendChild call to move the div that contains the ad i seem to loose the contents of the Iframe.
Any ideas whats going on
<div id="myad" style="display: none;">
GA_googleFillSlot("MyADSlotName");
</div>
<script>
window.onload = function() {
// leader board
document.getElementById('adplaceholder').appendChild(document.getElementById('myAd'));
document.getElementById('myAd').style.display = '';
</script>
UPDATE: I think what the problem here is that on text ads google writes to the iframe directly inserting the relevant text links where are on other ads it uses the iframe to just point to some src. seems like when i do the appendchild, if there is no "src" set for the iframe after the copy is done the iframe in the new location contains nothing... guess it does a reload on the src? Any way around this??
Hi,
I have a UILabel tha contains a URL (ie www.google.com). Is there a way to display the label as URL so the User can tap on the URL for Safari to open it?
Same question I have for a mailto item (ie [email protected]) to open mail with a new email to that address
thanks in advance
Hi everyone, I'm trying to e-mail a html table, that has links within it. But when I receive the e-mail, it just shows me the html code itself.
I'm using PHP pear to send the email.
I try constructing a string like so
$body = "<table>";
$body = $body . "<tr><td><a href='http://google.ca'>Google</a></td></tr>";
$body = $body . "</table>";
then e-mailing it, but when I receive the e-mail, it comes like this
<table><tr><td><a href='http://google.ca'>Google</a></td></tr></table>
Any suggestions? Thanks!
I want to use a view to select nodes in a content type field. This view must receive an argument that is another field of the content type.
Can someone explain me how to pass the argument from the field to the view?
Excuse my poor english
I want to parse markdown style links, but I'm having some trouble matching the reference style ones. Like this one: [id]: http://example.com/ "Optional Title Here"
My regex gets the id and the url, but not the title.
Heres what I have:
/\[([a-zA-Z0-9_-]+)\]: (\S+)\s?("".*?"")?/
I go through and add the references to a hashtable. the id as the key and the value is an instance of a class I made called LinkReference that just contains the url and the title. In case the problem is not my regex, and my code adding the matches to the hash table, Heres my code for that too:
Regex rx = new Regex(@"\[([a-zA-Z0-9_-]+)\]: (\S+)\s?("".*?"")?");
MatchCollection matches = rx.Matches(InputText);
foreach (Match match in matches)
{
GroupCollection groups = match.Groups;
string title = null;
try
{
title = groups[3].Value;
}
catch (Exception)
{
// keep title null
}
LinkReferences.Add(groups[1].Value, new LinkReference(groups[2].Value, title));
}
You know when you roll over a menu, it will show a submenu.
I wanted to keep the submenu visible even tough I roll out from the button,
and only change the submenu when I mouse over other links or buttons.
Does this include javascript? or it can be done just in CSS?
What is wrong with this and how could I fix it. I have css menu (horizontal) that I want the background and font to be changed when one of the items is selected. I found another post that gave me some jquery code to help make it work, and I thought I had it coded right, but when I click on an item to change its class it adds the class, but the background and font stay the same? Any ideas here?
Heres the HTML
<ul id="menu_nav" class="buttons">
<li>
<a href="#" onclick="' . $menu_path . '">Item 1</a>
</li>
<li>
<a href="#" onclick="' . $menu_path . '">Item 2</a>
</li>
<li>
<a href="#" onclick="' . $menu_path . '">Item 3</a>
</li>
</ul>
Heres the CSS:
ul#menu_nav
{
float:left;
width:790px;
padding:0;
margin:0;
list-style-type:none;
background-color:#000099;
}
ul#menu_nav a
{
float:left;
text-decoration:none;
color:white;
background-color:#000099;
padding:0.2em 0.6em;
border-right:1px solid #CCCCCC;
font-family: Tahoma;
font-size: 11px;
font-style: normal;
font-weight: bold;
position: relative;
height: 21px;
line-height:1.85em;
}
ul#menu_nav a:hover {
background-color:#F1F4FE;
color:#000099;
border-top:1px solid #CCCCCC;
}
ul#menu_nav li {display:inline;}
.selected {
background-color:#F1F4FE;
color:#000099;
border-top:1px solid #CCCCCC;
}
Here's the Jquery:
$(function(){
$(".buttons li>a").click(function(){
$(this).parent().addClass('selected'). // <li>
siblings().removeClass('selected');
});
});
Hi all,
I have varying mailto: email address on my site which are now being hit with various harvesters and subsequently I'm being spammed.
Can anyone assist me in creating some PHP code for the following:
<a href="mailto:[email protected]">[email protected]</a>
To prevent the address from being harvested and equally can I use this script on various email address displayed on the site?
Thanks
Hi, I am new to XML and am having a small problem in Flash. I have a number of buttons. Each of these buttons need to open up a different URL which is in a xml file (I have added only one button for now (banstead), as I wasn´t sure how to add more).
My XML:
<?xml version="1.0" encoding="utf-8"?>
<banstead targ="_self" href="http://www.marca.com"> </banstead>
My AS:
weblinkXML = new XML();
weblinkXML.ignoreWhite = true;
weblinkXML.load("xml/counties.xml");
weblinkXML.onLoad = function (success)
{
var url = weblinkXML.firstChild.attributes.href;
banstead.onRelease = function ()
{
getURL(weblinkXML.url);
}
}
For some reason when I test the movie and click on the button it doesn´t open the URL I requested.
Appreciate any help
I'm developing an application for Facebook using the iframe mode and ASP.NET.
I'm able to use the new OAuth method that combines the allow and the extended permissions. When I click on the Allow everything works as expected, but when I click on the "Don't Allow" I get a 500 internal error. The Request For Permission url is:
http://www.facebook.com/connect/uiserver.php?client_id=389845102120&scope=publish_stream%2Cuser_birthday%2Cemail&redirect_uri=http%3A%2F%2Fapps.facebook.com%2Fplumreward%2FDefault.aspx%3Fpid%3D124733857540930&display=page&next=http%3A%2F%2Fgraph.facebook.com%2Foauth%2Fauthorize_success%3Fclient_id%3D389845102120%26scope%3Dpublish_stream%252Cuser_birthday%252Cemail%26redirect_uri%3Dhttp%253A%252F%252Fapps.facebook.com%252Fplumreward%252FDefault.aspx%253Fpid%253D124733857540930%26type%3Dweb_server&cancel_url=http%3A%2F%2Fgraph.facebook.com%2Foauth%2Fauthorize_cancel%3Fclient_id%3D389845102120%26scope%3Dpublish_stream%252Cuser_birthday%252Cemail%26redirect_uri%3Dhttp%253A%252F%252Fapps.facebook.com%252Fplumreward%252FDefault.aspx%253Fpid%253D124733857540930%26type%3Dweb_server&app_id=389845102120&method=permissions.request&return_session=1&perms=publish_stream%2Cuser_birthday%2Cemail
When I click don't allow it goes to http://www.facebook.com/connect/uiserver.php and then to
http://graph.facebook.com/oauth/authorize_success?client_id=389845102120&scope=publish_stream%2Cuser_birthday%2Cemail&redirect_uri=http%3A%2F%2Fapps.facebook.com%2Fplumreward%2FDefault.aspx%3Fpid%3D124733857540930&type=web_server&perms&selected_profiles=567961887
with a HTTP 500 Internal Server Error.
What am I doing wrong? Am I missing a setting, parameter? Is this a FB bug?
What is wrong with this statement?
<%= Html.ActionLink("Assign Users", new { Controller="Users", Action="Index", Query="Index", Page=2932 })%
I`m having the following error:
Error 10 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'ActionLink' and the best extension method overload 'System.Web.Mvc.Html.LinkExtensions.ActionLink(System.Web.Mvc.HtmlHelper, string, string)' has some invalid arguments c:\Code\MvcUI\Views\Project\Index.aspx 17 22 MvcUI
Error 11 Argument '3': cannot convert from 'AnonymousType#1' to 'string' c:\Code\MvcUI\Views\Project\Index.aspx 17 54 MvcUI
Hi, i'm having trouble with Poco libraries. I need a simple solution to make the compilation easier. Is there any pkg-config file for Poco library to use it into our make files? Or any alternative solution?
Currently i use Ubuntu gnu/linux.
Hello,
I am trying to build an authentication plugin that uses php/xml.
My application can communicate to another application by sending this :
http://tst.example.net/remote/validate_user.jhtml?ticket=$ticket_value
in return i get a formatted xml document. i want to be able to parse that document.
I googled and read a bit around here , but what i could find is that using php_simplexml i can do the following
$xml = simplexml_load_file("test.xml");
echo $xml-getName() . "";
foreach($xml-children() as $child)
{
echo $child-getName() . ": " . $child . "";
}
my question is : i don't have a test.xml file, it is a url that i am reading/parsing, any way how to get the info from the url, not a file.
I know this is a very noobish question, i would appreciate the help
Hi all,
I was wondering how to obtain this result :
http://img718.imageshack.us/img718/6173/screenshot20100411at126.png
This is what I tried :
<RelativeLayout android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#CCCCCC"
android:orientation="horizontal"
android:layout_weight="0">
<Button android:id="@+id/btn_cancel"
android:text="@string/cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5px"
android:gravity="left"
/>
<Button android:id="@+id/btn_save"
android:text="@string/save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5px"
android:layout_toRightOf="@id/btn_cancel"
android:gravity="right"/>
</RelativeLayout>
I tried to play with the layout_width properties and setting them up to fill parents both of them but did not work, if anyone has an idea ... Thank you !
i have some problems with linking nasm program for macos:
GLOBAL _start
SEGMENT .text
_start:
mov ax, 5
mov bx, ax
mov [a], ebx
SEGMENT .data
a DW 0
t2 DW 0
fry$ nasm -f elf test.asm
fry$ ld -o test test.o -arch i386
ld: warning: in test.o, file was built for unsupported file format which is not the architecture being linked (i386)
ld: could not find entry point "start" (perhaps missing crt1.
fry$ nasm -f macho test.asm
fry$ ld -o test test.o -arch i386
ld: could not find entry point "start" (perhaps missing crt1.o)
can anyone help me?
I have a script that creates a printable page by copying the HTML across and then doing some manipulation, such as disabling the buttons on the page, on page load.
I also want to disable the links on the page. I don't really mind if they look like links still as long as they don't do anything, and don't give any JavaScript errors!
The anchor tag doesn't seem to have a disabled attribute...
Unfortunately, I can't use jQuery, so JavaScript only please!
Edit: I want to disable the links, buttons etc on the page so that when the 'printable page' opens in another window, the user cannot mess with it by clicking buttons or links. I want it to essentially be a 'frozen snapshot' of the page that they want to print.
Hi. I'm having a problem having my projects built in VC++ Express 2008...
I'm using a library, irvine32.inc/lib. INCLUDE Irvine32.inc works for me at school (On already configured VS environments) by default, but at home (Windows 7 x64) I'm having a boatload of issues.
My original post here was that a file that irvine32.inc referenced, in the same folder, 'could not be opened.' Added irvine folder to the include path for specific project, progress.
Then I was getting an error with mt.exe, but a suggestion on the MSDN suggested turn off antivirus, and now project does build but when I run a program that does NOT reference anything in irvine32, it tells me repeatedly that my project has triggered a breakpoint, and allows me to continue or break. Continue just pops the same window, break loads another popup telling me that "No symbols are loaded for any call stack frame. Source code cannot be displayed." This popup lets me view the disassembly.
I tested it with and without working statements, it just throws the same breakpoint on the first line of code. Now, if I run the program when it DOES require something from the include file, in this case, DumpRegs:
INCLUDE Irvine32.inc
.data
.code
main PROC
mov ebx,1000h
mov eax,1000h
add eax,ebx
call DumpRegs
main ENDP
END main
This gives me
1main.obj : error LNK2019: unresolved external symbol _DumpRegs@0 referenced in function _main@0
1C:\Users\Cameron\csis165\Lab8_CCarroll\Debug\Lab8_CCarroll.exe : fatal error LNK1120: 1 unresolved externals
This does NOT happen when I build a project from the book author's examples, which has the same include statement.
I'm baffled. :(
Hi, i need some help please,
i want to show an image on my Page depending of the first directory of the URL.
Example:
In Any of this URLs will show the image1.jpg
www.mysite.com/audio/amplifiers/400wats.html
www.mysite.com/audio/
www.mysite.com/audio/amplifiers/
In any of this others will show the image2.jpg
www.mysite.com/video/spots/40wats.html
www.mysite.com/video/amplifiers/400wats.html
www.mysite.com/video/lighting/laser.html
www.mysite.com/video/laser/
At the moment i can show the image only if the url is only the first directory, bu no in the internal directory or documents.
This is the script that i'm using right now:
<script type="text/javascript">
switch (location.pathname)
{
case "/audio/":
document.write("From Web<BR>")
break
case "/video/":
document.write('<A HREF="slides.htm" target="_blank"><IMG SRC="/adman/banners/joinvip.gif" WIDTH=728 HEIGHT=90 BORDER=0></A>')
break
default:
document.write('<A HREF="http://www.apple.com" target="_blank"><IMG SRC="http://www.amd.com/us-en/assets/content_type/DownloadableAssets/NEW_PIB_728x90.gif" WIDTH=728 HEIGHT=90 BORDER=0></A>')
break
}
</script>
Thank you
Hi, i need some help please,
i want to show an image on my Page depending of the first directory of the URL.
Example:
In Any of this URLs will show the image1.jpg
www.mysite.com/audio/amplifiers/400wats.html
www.mysite.com/audio/
www.mysite.com/audio/amplifiers/
In any of this others will show the image2.jpg
www.mysite.com/video/spots/40wats.html
www.mysite.com/video/amplifiers/400wats.html
www.mysite.com/video/lighting/laser.html
www.mysite.com/video/laser/
At the moment i can show the image only if the url is only the first directory, bu no in the internal directory or documents.
This is the script that i'm using right now:
<script type="text/javascript">
switch (location.pathname)
{
case "/audio/":
document.write("From Web<BR>")
break
case "/video/":
document.write('<A HREF="slides.htm" target="_blank"><IMG SRC="/adman/banners/joinvip.gif" WIDTH=728 HEIGHT=90 BORDER=0></A>')
break
default:
document.write('<A HREF="http://www.apple.com" target="_blank"><IMG SRC="http://www.amd.com/us-en/assets/content_type/DownloadableAssets/NEW_PIB_728x90.gif" WIDTH=728 HEIGHT=90 BORDER=0></A>')
break
}
</script>
Thank you
Hi this is my pice of code:
<div style="overflow: hidden; width: 445px;">[IMG]http://i29.tinypic.com/mydog.png[/IMG] tak si to http://i29.tinypic.com/mycat.png Lorem ipsum loremai <img width="15" border="0" align="middle" src="images/smejo.gif" valign="middle"/> <img src=http://www.example.com/index.png alt> <img src="http://www.example.com/index.png" alt> <a href="#reakcia" title="reagovat na temu"><span class="poradna-tl-reaguj"><reaction> </span></a></div>
</td> </tr><img src=http://www.example.com/index.png alt><img src="http://www.example.com/index.png" alt>
and i need regex pattern to replace ONLY text image links with image without touch of inner url tags.
But i can't use "Lookbehind" or possessive quantifiers because JS don't support them=/
So i want to catch only "http://i29.tinypic.com/mydog.png" and "http://i29.tinypic.com/mycat.png".
I using array method to replacing (will be greasemonkey script.)
Many Thanks
Hi fellas,
In our format some pages must be in Tabs that's ok. But some of them must be open in a blank page... So How can i do that. I have try ;
$('#tablar #tabs ul li a').filter(function() {
return $(this).attr('rel') == 'ex';
})
.unbind()
.click(function(e) {
location.href = this.href;
e.preventDefault();
});
But not working...
I need a way to make an entire DL element clickable with only one anchor tag, that validates as XHTML. As in:
<a>
<dl>
<dt>Data term</dt>
<dd>Data definition</dd>
</dl>
</a>
This currently doesn't validate as XHTML as the anchor tag cannot contain the DL. The only way I can get it to validate is if I make two anchor tags and place them inside DT and DD. As in:
<dl>
<dt><a>Data term</a></dt>
<dd><a>Data definition</a></dt>
</dl>
I'm trying to avoid this, as it would result in two href attributes requiring maintenance, introducing the possibility they could become out of sync.
Suggestions?