I have to choose an online WYSIWYG editor. I'm pending between TinyMCE and Xinha. My application is developed in Asp.Net 3.5. Could you help me with with some pros and cons?
hi
I'd like to integrate a theme tag to my elements so they appear in diffrent colours. But since the css selectors have the same css specificity the latest overrides the earlier defined rule.
this is an example that shows my problem:
....
<div class="red">
<div class="box">This should be red</div>
<div class="yellow">
...
<div class="box">This should be yellow (nested in x levels under the div.yellow)</div>
...
</div>
....
and here my css
.box { width: 100px; height: 100px; }
.yellow { background-color: yellow; }
.red { background-color: red; }
the box should be listed somewhere, but as soon as it is a sub child of another color definition it should been overwritten.
thanks for any help!
//jim
I have a jQuery colorbox opened over top of my webpage (with a <select> drop down list) and I'd like to make an AJAX call every time a new <option> is selected from the drop down.
I have the following code, but it's not picking up the select event.
$('#cboxLoadedContent select[name=parent]').live('select', function() {
$.get("edit.php", { fn: 'getFormatLevel', parent: $('select[name=parent]').val() }, function(data) {
alert("Data Loaded: " + data);
});
});
Any ideas why this isn't even recognizing my selector?
My form looks like:
**
<p><label>first name</label><input type=text name=fn /></p>
<p><label>last name</label><input type=text name=ln /></p>
</div>
<div id="rightform">
<p><label>state</label><input type=text name=state /></p>
<p><label>city</label><input type=text name=city /></p>
</div>
**
I want the layout so all the labels line up on the left (with the label text right-aligned), and the input box all lined up, floating to the left.
So the form should look like:
asdf-label INPUTBOX
123-label INPUTBOX
yet-another-label INPUTBOX
There will be another form on the right side of the above form (with the id=#rightform)
Really confused how to do this properly...
Say I have an anchor on a webpage like so:
<a name="comegetit"></a>
Is there a way of running a javascript if the page is arrived at by a link that lands on this anchor? (e.g. a link like <a href="http://myawesomewebpage.com/page#comegetit"></a>). I don't think there is but I would like there to be.
Hi All,
I am using fedora/mozilla for my development enviorment.
I am using
margin: 0 auto;
to align a content in a center but it's not working on windows/IE8. while it is working properly on All other browser for Fedora, Window, Mac.
Regards,
Salil Gaikwad
Hello,
From a MySQL table called "submission" containing the fields "loginid, submissionid, title, url, datesubmitted, displayurl", I would like to print an HTML table thats contains all "title" and corresponding "datesubmitted" where "loginid" equals "$profile." The code I am trying to use is below. It isn't working. Any ideas why it isn't working?
Thanks in advance,
John
$profile = $_GET['profile'];
$sqlStr = "SELECT loginid, submissionid, title, url, datesubmitted, displayurl
FROM submission
WHERE loginid = $profile
ORDER BY datesubmitted DESC";
$result = mysql_query($sqlStr);
$arr = array();
echo "<table class=\"samplesrec\">";
while ($row = mysql_fetch_array($result)) {
echo '<tr>';
echo '<td class="sitename1"><a href="http://www.'.$row["url"].'">'.$row["title"].'</a></td>';
echo '</tr>';
echo '<tr>';
echo '<td class="sitename2">'.$row["datesubmitted"].'</a></td>';
echo '</tr>';
}
echo "</table>";
I am working on a site maintainence. It uses mod_rewrite technique. But im new to mod_rewrite. How should i change the url to work correctly in my localhost.
here's the code:
# Enable mod_rewrite, start rewrite engine
Options +FollowSymLinks
RewriteEngine on
rewritecond %{http_host} ^electricians4u.com.au [nc]
rewriterule ^(.*)$ http://www.electricians4u.com.au/$1 [r=301,nc]
ErrorDocument 404 /error404.php
# for searching
RewriteRule ^([^/]*)-in-([^/]*)\.htm$ /search.php?searchby=$1&SearchString=$2&search.x=$3&search.y=$4&search=Find+Agent [NC]
# for nav
RewriteRule ^electricians-in-([^/]*)-([^/]*)$ /search.php?SearchString=$1&state=&page=$2 [NC]
# index page
RewriteRule ^find-electrician-(.*)$ /find_electrician_in.php?state=$1 [NC,L]
# find page
RewriteRule ^electrician-(.*)-(.*)$ /find_electrician_in.php?state=$1&bspname=$2 [NC,L]
# find page
RewriteRule ^electricians-in-([^/]*)\.htm$ /search.php?state=$1&bspname=$2&locality=$3 [NC]
Plz help. I know this silly question to ask. But i dont know other alternative.
I want to display about 5-8 images on my page, one by one, but I would like them to pre-load one and not loading them each time i switch to anohter image.
I have seen some examples where they have all images (hidden) on the page something like:
<a href=""><img id="img1" src="images/image1.png" class="image" alt="" /></a>
<a href=""><img id="img2" src="images/image1.png" class="image" alt="" /></a>
<a href=""><img id="img3" src="images/image1.png" class="image" alt="" /></a>
And the unhide the current image.
And what I have is one image that i change it's src attribute for path for new images from th array.
SwitchNextImage: function(){
var theimg=document.getElementById("imgContainer");
this.currentIndex = this.currentIndex+ 1 == this.totalImageCount ? 0 : this.currentIndex + 1;
theimg.src=this.slideimages[this.currentIndex].src;
}
The first method is obviously faster loading. But requies static links.
My questions is how can I make my method more faster loading?
I am working on a CMS site that uses dynamic navigation. There is one link on the site that I would like to be able to open in a new window. However, since this is a dynamic environment I can't add the standard, target="_blank" to the link. so how can i open the link in new window without using jquery ?
Is there a way to shrink what's inside an iframe without adjusting css?
any magical 'zoom' parameter out there?!!!
I have a 600px preview iframe i want to fit a 1000px site in without scrollbars...
I was looking at this question: http://stackoverflow.com/questions/117641/how-to-remove-duplicate-elements-from-an-xml-file
It has <ns0: for ? I have never seen it before.
When I have to render textarea content to the front end I usually pass it thru a function that converts newlines to <br/> tags and double newlines signal paragraph tags so blocks of text get surrounded by <p> and </p> tags.
To save time I usually use a ready made PHP function from the wordpress codebase. You can get the link from the man himself:
http://ma.tt/scripts/autop/
If you check it out you'll see it does some heavy lifting with about 20 regular expressions.
I know I could use a wysiwyg editor (like TinyMCE or CKEditor) that can format the data on the client and then send it to the server (most of them add <p>..</p> tags by default) but I want to know the experience of others in handling raw textarea input and then displaying it on the front end.
I have two div containers which are structured as follows:
<div class="outer-div">
<img src="images/point.png" class="img-a1">
<img src="images/point.png" class="img-a2">
Lots of text goes here.
</div>
<div class="outer-div">
<img src="images/point.png" class="img-a1">
<img src="images/point.png" class="img-b2">
Some more text goes here
</div>
The styles associated with this are as follows:
.outer-div {
position: absolute;
top: 0px;
left: 0px;
width: 500px;
}
.img-a1 {
float:left;
z-index:-1;
position:relative;
margin-left: 250px;
margin-bottom: 100px;
}
.img-b1 {
float:right;
z-index:-1;
position:relative;
margin-left: 250px;
margin-bottom: 100px;
}
img-a2 {
float:left;
z-index:-1;
position:relative;
margin-left: 400px;
margin-bottom: 200px;
}
img-b2 {
float:right;
z-index:-1;
position:relative;
margin-left: 400px;
margin-bottom: 200px;
}
The result of this is to produce something like the following, where ... is the text from div-a and ||| is the text from div-b:
.....|||||
.....|||||
.. ||
.. ||
However, since the second div is placed immediately above the first div, none of the text in the second div can be selected, although it can be seen since there is just empty space, and a 1x1 px image above it.
Is there a way to get the text from the lower div to be selectable, without making the upper div unselectable?
I've been tinkering around with the excellent Superfish drop-down menu to fit my needs. Here's the result. Still, there are two oddities I need to fix.
Since I changed the font family and font size used for the items in the menu bar, the drop-down menus are aligned incorrectly a few pixels lower than where they should be.
Secondly, when I hover over a menu item that has a submenu, an arrow to the right is displayed but it's not as visible as it should be due to the light background color. Can I change this quickly without making a new arrow image?
Is there a possibility to turn off the automatic enclosing of all written content within <p></p> in CKEditor 3.x?
I tried
CKEDITOR.config.enterMode = CKEDITOR.ENTER_BR;
but this just changes the inline linebreaks to <br /> while leaving the enclosing paragraph.
Currently writing "Test" produces this output
<p>
Test</p>
but I want it to be simply
Test
Is there a configuration property for this or would another inline editor to be better suited for this?
I have a web page which allows the user to carry out various operations that in turn modify the database. Also, this web application needs to keep track of various fields in database that keep changing with time. Is refreshing the page every few seconds the best possible way to implement this? For example, if there is a long list on the page requiring scrolling, it is hard to view the list since the page keeps resetting due to the refresh. I know, there are ways to retain the position of the scroll. But, could I use something more efficient?
I have tester.php file which I want to run on the browser and I have created symlink to it in my public_html folder, but still when I try to run it, its not working and gives me following error message.
Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.
Error 403
web.upc03.dev.com
Sun Apr 4 22:41:23 2010
Apache
I am not sure as to why am I getting this error message, I have check all file permissions settings and it seems to be fine.
My File permissions settings are:
lrwxrwxrwx for tester.php
Is there something that should be done other way or is this not the proper approach ?
I have set up a demo that has 5 floating <div>s with rotated text of varying length. I am wondering if there is a way to have a CSS class that can handle centering of all text regardless of length. At the moment I have to create a class for each length of characters in my stylesheet. This could get too messy. I have also noticed that the offsets get screwd up is I increase or decrease the size of the wrapping <div>.
I will be adding these classes to divs through jQuery, but I still have to set up each class for cross-browser compatibility.
.transform3 {
-webkit-transform-origin: 65% 100%;
-moz-transform-origin: 65% 100%;
-ms-transform-origin: 65% 100%;
-o-transform-origin: 65% 100%;
transform-origin: 65% 100%;
}
.transform4 {
-webkit-transform-origin: 70% 110%;
-moz-transform-origin: 70% 110%;
-ms-transform-origin: 70% 110%;
-o-transform-origin: 70% 110%;
transform-origin: 70% 110%;
}
.transform5 {
-webkit-transform-origin: 80% 120%;
-moz-transform-origin: 80% 120%;
-ms-transform-origin: 80% 120%;
-o-transform-origin: 80% 120%;
transform-origin: 80% 120%;
}
.transform6 {
-webkit-transform-origin: 85% 136%;
-moz-transform-origin: 85% 136%;
-ms-transform-origin: 85% 136%;
-o-transform-origin: 85% 136%;
transform-origin: 85% 136%;
}
.transform7 {
-webkit-transform-origin: 90% 150%;
-moz-transform-origin: 90% 150%;
-ms-transform-origin: 90% 150%;
-o-transform-origin: 90% 150%;
transform-origin: 90% 150%;
}
Note: The offset values I set were eye-balled.
Update
Although I would like this handled with a stylesheet, I believe that I will have to calculate the transformations of the CSS in JavaScript.
I have created the following demo to demonstrate dynamic transformations. In this demo, the user can adjust the font-size of the .v_text class and as long as the length of the text does not exceed the .v_text_wrapper height, the text should be vertically aligned in the center, but be aware that I have to adjust the magicOffset value.
Well, I just noticed that this does not work in iOS...
What is a nice way to do leading dots in a table of contents with CSS?
Example:
Link.............Chapter 1
Link.............Chapter 2
Link.............Chapter 3
Hi guys,
In my HTML page I have 2 select menus with IDs "month" and "day" - "day" is empty when the page loads, "month" has 12 options with values 1-12 corresponding to January - December.
"month" has an onchange event which calls this function:
function showOutboundDays(month)
{
if(month==4 || month==6 || month==9 || month==11)
document.getElementById('day').innerHTML='<option value="1">1</option><option value="2">2</option>'; etc. up to 30
else if(month==2)
document.getElementById('day').innerHTML='<option value="1">1</option>'; etc. up to 28
else
document.getElementById('day').innerHTML='<option value="1">1</option>'; etc. up to 31
}
(just imagine there are braces around the option tags to help you see...)
I think it's pretty clear to see what I'm trying to achieve...and everything works fine apart from the innerHTML of the select with ID "day" doesn't get filled at all, regardless of what month you pick. And I know the problem is with this stage of the function because when I change the if, elseif and else code-to-be-executed to alerts or something similar, it works fine.
Does anybody know what the problem with the innerHTML is?
Thanks
EDIT: Using Firefox 3.6
Client code is pretty simple:
<form action="DDServlet" method="post">
<input type="text" name="customerText">
<select id="customer">
<option name="customerOption" value="3"> Tom </option>
<option name="customerOption" value="2"> Harry </option>
</select>
<input type="submit" value="send">
</form>
Here is the code on the Servlet
Enumeration paramNames = request.getParameterNames();
while(paramNames.hasMoreElements()){
String paramName = (String)paramNames.nextElement(); //get the next element
System.out.println(paramName);
}
When I print out, I only see, customerText, but not customerOption. Any idea why guys? What I hope is, if I select Tom in my option, once I submit, on my servlet I should able to do this: String paramValues[] = request.getParameterValues(paramName); and get back value of 3
Hi folks,
I'm trying to add textures and shadows outside div elements in a webpage, without using "wrappers".
Any suggestions?
These are a few examples:
Help would be very much appreciated!
Hey,
I have an input text :
<input name="Email" type="text" id="Email" value="[email protected]" />
I want to put a default value like "What's your programming question ? be specific." in StackOverFlow, and when the user click on it the default value disapear.