I have a HTML string and want to replace all links to just a text.
E.g. having
Some text <a href="http://google.com/">Google</a>.
need to get
Some text Google.
What regex should I use?
in views.py:
@user_passes_test(lambda u: u.is_superuser)
def h_view(request):
return render_to_response('mytest/news.html',context_instance=RequestContext(request))
but i want to show this page when admin login,and my now page is :
<li id="tab_mytest"><a href="{% url mytest_list %}" class="{% block mytest_css_name %}{% endblock %}">{% trans "mytest" %}</a></li>
how to change it,
has this method :user.is_superuser ??
thanks
I want to change the page, I'm not sure if it is possible with JavaScript, so I tried with HTML, and it failed.
if (text=="home") {'<meta http-equiv="REFRESH" content="1;url=index.php">'; return;}
Any ideas on how to do this?
hi,
I want to display a children element of my html page all over the browser window.. in other words I would like to enlarge it and keep it the same size the browser window also when it is resized after loading.
I was wondering if I have to move this object outside the parent elements or I can set these properties with css.
At the moment if I set width:100% and height:100%, it fits the parent (of course) and not the window.
thanks
I would like to retrieve a page's full HTML source using Flex, but I am not having much luck so far. I keep running into problems when I use URLLoader.
Can someone provide a complete, working example?
Say I had a file like... http://my.website.com/myfile.raw
and this file was just raw bytes, representing an intensity image. Is it possible to grab this data and read the bytes in JavaScript? And then using it with HTML 5 canvas (e.g., putImageData) to draw an image?
Or is there some other way to do this in the browser without Java or Flash?
I am scrapping data from web site using my java application and want to display the result after parsing code of html page in a Text Area made in Swing.
Text like: hello <b>every</b>one should be displayed as: 'hello everyone' in text area.
Thanks!!
I'm using CSS 3 features like "rounded corner" or "shadow box".
IMHO These are fantastic features for people like me with no graphics knowledge. But, i've noticed, IE 7-8 not support CSS 3.
So i'm asking you: is there a way to "enable" some features maybe with some javascript functions to include in my html file ?
Thank you!
Adobe Air's (read: Flex) mx:HTML component uses WebKit to render webpages. As such, does anyone know of a way to tweak WebKit's settings via the Air application (or a Flex API)? For example, I'd like to set WebKit's "enable-private-browsing" setting from "false" to "true".
I have an input textbox on an asp.net page and when a user inputs any tags like break tags or bold an error occurs. I currently am using the following to encode the input:
Server.HtmlEncode(mytextbox.Text)
However this only encodes characters when they aren't phrased as an html tag, like if the input is "<<<" is there a way for me to allow the user to put the tags in without it leading to a runtime error?
Thanks.
Still new to Android
I want to display some data as an HTML-like ordered list (non-actionable).
Example;
Item One
Item Two
Item Three
I feel I am missing something obvious.
Thanks,
JD
I searched for many web-bases html editor for asp.net such as tinyMCE ,ckeditor ... but i want one that give me ability to upload image into server while inserting it into the text
Could anyone give me best editor that have this feature ?
Does anyone know of a good online resource which gives a clear reference on the SQL syntax supported by HTML 5 client-side databases? I've looked about and cannot seem to locate one.
Thanks
When I enable 32 bit applications on the application pool of a website running on Server 2008 web IIS7, a handler mapping for *.html - asp.dll no longer works. Can anyone explain why?
Hi there,
What's the difference between using the two options below to output link HTML?
theme('links', $primary_links, array('class' => 'links primary-links'))
theme_links($primary_links, $attributes = array('class' => 'links primary-links'))
Many thanks
I want to ....
create a html-email containing several images (company header, etc).
The images shall be displayed as email content, not as an attachement.
So how is the best way to do this?
I'm aware of two possibilities:
embedded images send as attachment (<IMG
src="cid:321353119@02062010-119E">)
images are placed on the server (<img src="http://myserver.com/mypicture.gif">)
Should this bar on the HTML designer show the tag name? It sometimes does!
Here's an image of what I referring to.
I thought for sure it must be a bug but considering that I heard that MS was rewriting the editor (designer too?) I am starting to question whether I know how to use it!
I want to create multiple versions of print-friendly pages from a single page. I am considering to do it in this way: placing several buttons on the original page and, clicking one button will popup a new window with the same html as its parent window, but with some modifications (e.g., set display attribute of some DIV's to none).
It is possible to use javascript to do this?
I have a string containing HTML loaded from another page, how do I extract the background property from it's body tag using Javascript?
The body tag in the string looks like this:
<body onload='init();' background='storage/images/jsb_background.jpg' link='#000000' vlink='#000000' alink='#000000' leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>
Thanks!
I'd like to know if there is a way to dynamically modify/access the data contained in html images just as if they were an html5 canvas element. With canvas, you can in javascript access the raw pixel data with getImageData() and putImageData(), but I have thus far been not able to figure out how to do this with images.
I have a set of data in a matrix which I would like to display in my iPhone app with all of the rows and columns intact. Everything I can find on the web dealing with "tables iPhone" gives me information on UITableView, which only lets you show a list of items to the user - not an actual table in the HTML sense. What's the best way on the iPhone to display an actual table of data to the user, with column & row headings and table cells?