<form enctype="multipart/form-data" method="post" action="mailto:[email protected]" accept-charset="UTF-8">
Is there a problem if mails are sent this way .. i wanna avoid using PHP codes..
I have some code:
- count = 0
- @clients.each do |client|
%div{:class => "grid_2#{(" alpha" if (count % 3) == 0) || (" omega push_2" if (count % 3) == 2) || " push_1"}"}= link_to h(client.name), client
- count += 1
I want to output an opening div tag right after the each statement if the (count % 3) == 0 and out put the end tag at the end of the block if the (count % 3) == 2 but I can't figure out how to get HAML to do this. Any ideas?
I'm building a WSS site which has to show SVG files stored on WSS.
I'm trying to use <object> tag to show it and it doesn't show, however, if I use <embed> it works ok. Im'using IE8 and IE7
I've been reading and everyone tells IE prefers <Object> over <embed>, but in WSS it doesn't work this way.
To display the file I'm using a web content editor webpart with this code:
<object type="image/svg+xml" data="/samples/sample.svg"
name="owMain" width="400" height="150">
</object>
Any clue??
I'm referencing my js files before the closing body tag, hoping they will be parsed last (as they're not needed untill last). However when I analyse activity with PageSpeed in Firebug, the images seem to be requested last.
How can i make the images higher priority than the js?
Currently I have this markup that represents an icon container and some elements styled with CSS inside it that in the end show as graphic icon.
<div class="icon">
<div class="icon-element1"></div>
<div class="icon-element2"></div>
<div class="icon-element3"></div>
</div>
The number of the child elements can be different depending on the complexity of the icon.
What I want is to somehow move as much as possible to CSS stylesheet, so that ideally I would have only <div class="icon"></div> and the rest would just render from CSS styles, something close in concept to :before/:after, a kind of virtual divs. I don't want to use JavaScript to add the elements dynamically. It would be possible to do this if we had multiple :before/:after.
Here is an example of an icon I get by using the markup from above:
As you can see, there are 3 child elements representing gray case, white screen and turquoise button.
Please advise, how I can simplify this markup so that not to have to put all the divs each time I want this icon to be shown.
I have a form with a disabled submit button. Even though the user can't press this button, he can still hit Enter to submit the form. How do I prevent that?
I have a form which have a file input;
<%form_tag '/dboss/newsbsresult' , :remote=>true do %>
<input type="file" id="examsendbutton" name="txtsbs"/><br/>
<input type="submit" value="Gonder">
<%end%>
Here i want the user to select a txt file which i try to parse and use at server, but i cannot catch the uploaded file with this code,
def newsbsresult
@u = params[:txtsbs] #Or params[:txtsbs].to_s
p @u
end
What is the true way of achieving this?
Well since it seems relatively difficult to send the object of a WebControl over JSON using jquery.ajax() I've decided to send the name of the control as a string because I know how to do that. Then I promptly realized that, from a web service, I don't actually know how to search for a control by ID name. Since its a service I can't seem to get Control.FindControl() to work so does anyone have ideas or suggestions? All I'm trying to do is call a databind() on my radcombobox.
Thanks in advance!
For any of you that knows anything about asp.net/rad controls - I'm basically updating a database and want the radcombobox to be in sync with that database again after adding something, before I autoselect what was just added. Other than databind do i have to call anything to refresh that list?
Thanks again!
Hello,
we have an web-application built in flash (it's actually just getting built :D) where is very important to be notified, when user closes his window.
Since it's in flash, we do not worry about Javascript, we do not support non-javascript users.
What is the safest (meaning it's 100% sure it gets called) X-browser way to call php script to close session, make some db changes, etc.?
Thank you
Hi I want to count LI which does not have the UL , for the first level only,
but when I count this it shows size 4 instead of 2, its count the inner LI also.
<div class="navigation-container">
<ul class="first-level">
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a>
<ul>
<li><a href="#">Link2.1</a></li>
<li><a href="#">Link2.2</a>
<ul>
<li><a href="#">Link 2.2.1</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#">Link </a></li>
</ul>
</div>
jQuery for this.
jQuery(document).ready(function(){
var nosubnav = jQuery('.first-level li:not(:has(ul))');
var nosubnavsize = jQuery('.first-level li:not(:has(ul))').size();
jQuery(nosubnav).css('border' , '1px solid red');
alert('List item which does not have submenu '+nosubnavsize);
});
Link for the testing link text on JSBin,
thanks
I have a set of anchors like
<a class="lb" href="#">text</a>
<a class="lb" href="#" style="width:200px">text</a>
<a class="lb" href="#" style="color: reen; width:200px">text</a>
that needs to be transformed to the following:
<a class="lb" href="#"><span>text</span></a>
<a class="lb" href="#"><span style="width:200px">text</span></a>
<a class="lb" href="#" style="color:green"><span style="width:200px">text</span></a>
I have no problem creating child span but don't know how to move parent's width styling.
Quite a while ago i was more in websites building then i am now.
In my time there where huge debates about what to use; tables or pure CSS alternatives.
I went out of the webdesigning, but now an old question re-surfaces.
What i would like to create is a web page design that depending on screensize, would self organize the page into columns, so that for example on a PDA it would show 1 column
On an old computer monitor, it would show 2 colomns, and on a widescreen laptop it would show 3 columns. I forgot how this was called and how it was done in the past, it had to do with XML and storing data seperate from design (if i remember well), perhaps these days better methods exist to do that, does this, anyone ring this a bell ?
Also i note a lot is possible with Jquery and and brouwser depending webkits.
But i need to make sure that it would run on all (modern) brouwsers : Iexplorer, Firefox, chrome
And Jquery is nice too, but i am kinda woried that some day one of these brouwser vendors decides that jscript like java isnt enabled by default (or is that very unlikely ?)11
Perhaps someone can point me to a method that is the prefered way to do this.
I have a DIV element with this given class:
.slideshow { background: white; width: 700px; height: 300px; padding:10px; margin: 0 auto; position: relative; box-shadow: 0px 0px 5px grey, 0px 10px 20px rgba(0,0,0,.1) inset; }
I define those two pseudo-elements (:before and :after):
.slideshow:before, .slideshow:after { content: " "; background: green; width: 50%; height: 50%; position: absolute; z-index: -10; }
My problem is that those two pseudo-elements appear in front of my DIV and not behind. Is there any specific reason for this behaviour?
Here is an example: EXAMPLE
The Javascript part is a bit messy but i'm still working on it.
Also I've noticed that if I delete all the JS part I don't have anymore this problem, but I don't think there is anything in the code that should modify the slideshow DIV
SOLVED: The problem is in the javascript part where I have:
$('.slideshow').css('-webkit-transform', 'rotate(0deg)');
Removing this line solved the problem.
I guess that pseudo-elements :before and :after are not compatible with the property transform.
Hello All,
How can I escape a ' (single quote) in JS. This is where I'm trying to use it.
<input type='text' id='abc' value='hel'lo'>
result for the above code is "hel" populated in the text box. I tried to replace ' with \' but this what I'm getting.
<input type='text' id='abc' value='hel\'lo'>
result for the above code is "hel\" populated in the text box.
How can I successfully escape the single quotes.
I have a styling problem, I am using WordPress and want to do have the first two classes completely different to the others.
My ideal situation is to have:
.si-biplace:nth-of-type(3) { float:left; margin:20px 0px 0px 0px; }
.si-image:nth-of-type(3) { float:left; margin:20px 0px 0px 0px; border:0px; }
.si-title:nth-of-type(3) { width:100px; height:20px; margin:0px; font-size:7px; color:#FFFFFF; font-weight:bold; }
They seem to work fine when it is:
.si-biplace { float:left; margin:-10px 0px 0px 0px; }
.si-biplace:nth-of-type(2) { float:left; margin:-10px 0px 0px 15px; }
Is there a reason why it will not work with nth-of-type(3) but will with nth of type 2? I basically want different attributes for every next time the div is used but cannot have separate div classes as it runs through a php array.
I cannot make the image a background image to a div and round the div's corners because the image is resized, and as far as I know, you cannot resize a background image.
What are my options, if any? Open to all suggestions including wrapper divs and corner images.
Also, if it cannot be done in IE but there's a solution for Firefox, that's just fine with me.
I'd like to use the CSS property position:fixed to fix the position of an element but at the same time prevent the element from being positioned over my footer when the user scrolls to the bottom of the page. Is there a way of stopping an element from showing over a footer in this way?
I've noticed a small alignment issue in the three major browsers when rendering my web site. As such how can I perform the following pseudo-code with pure CSS?
if Webkit (Safari/Chrome) {
#myDIV {margin-top:-3px}
} else if (Firefox) {
#myDIV {margin-top:0px}
} else { // IE and other browsers
#myDIV {margin-top:1px}
}
Ok, first off, I didn't program this page with frames! I'll be getting rid of them later. For now I need to solve this problem.
There's a link within a frame. Instead of that link just changing the contents of the frame, I need it to change the URL of the entire window. How can I do this?
Thanks for any help
I need to apply/remove to an input field according to a user's selection in a separate drop down form - but I can't figure out how to target the input's class.
I need to add/remove the 'pageRequired' class from this input:
<input type="text" title="Company Required" name="customfields-tf-2-tf" class="inputclass pageRequired textInput" id="customfields-tf-2-tf" />
When the user selects one of two options from a drop down field. For example:
<select class="dropdown" name="customfields-s-1-s" id="customfields-s-1-s" >
<option value="Owner"<?php if(in_array("Owner",$temp_values)) { ?> selected='selected'<?php } ?>> Owner</option>
<option value="Broker"<?php if(in_array("Broker",$temp_values)) { ?> selected='selected'<?php } ?>> Broker</option>
</select>
If the user selects broker than I want to add the pageRequired class to the first input field and remove it if the user selects Owner.
Hi, been playing with this for a few hours and can't figure it out.
jsFiddle example here.
Basically I want this to show on hover, and click it to toggle whether it is displayed or not. I thought this was the way to do it with display:block;, but I can't get it to work.
Thanks for any help.
Hi guys, i am creating a new site, based in a pre-existing web page
The original site is http://oasisrio.intermediasp.com/
Its works great in Firefox, Chrome, and IE
But the new one "oasisba.intermediasp.com"
Dont show the right bar in IE, i check all that i can think about and i dont found the problem.
Someone have any ideas why this is happening?
PD: Sorry for my crapy english
I am working on a web app and trying to code a form with two dropdown lists. The list in the second dropdown will be dependent on the selection from the first one. The task itself isn’t too complicated except that once the first selection is made, I need to make a database call to pull the data for the second dropdown. This is where I am having difficulty. Both lists are in fact populated from a database.
I am working on this in a python script and have been trying to do this w/ an onChange javascript function. The web app is built in Zope and page templates may be an option along w/ the python scripts.
Hey,
This is my first time with AJAX, so I'm a bit confused and need your help. I have four div id's and want to toggle hide/show between them based on result from database.
Sounds simple, eh! But it is hard to implement for me. HELP!.
This is my code -
<div id="1">HEya</div>
<div id="2">What's up?</div>
<input type="submit" id='approve' name="action" value="Approve" onclick="a()" class="approve" />
<input type="submit" id='reject' value="Reject" name="action" onclick="r()" class="reject"/>
<script language="javascript" type="text/javascript">
//if cookie exists, at the beginning the form should be hidden
if (<?php $responseanswer['response']=='approve'; ?> ){
document.getElementById('1').style.display = 'none';
document.getElementById('2').style.display = 'inline';
}
//if user clicks reject, hide one element dislay another
else if (<?php $responseanswer['response']=='reject'; ?>){
//if cookie exists
document.getElementById('2').style.display = 'none';
document.getElementById('1').style.display = 'block';
}
else
{
function a()
{
var a = document.getElementById('2');
document.getElementById('1').style.display= 'block';
}
//on reject creating a new cookie
function r()
{
var a = document.getElementById('reject');
document.getElementById('1').style.display = 'none';
document.getElementById('2').style.display= 'block';
}
}
</script>
Eveything is fine, but the div is not hiding.